Let's Make Things Better

How to Create and Use Alias Command in Linux

List Currently Defined Aliases in Linux

$ alias

As you can see, executing.

$ ll

Is equivalent to running:

$ ls -alF

Creating Temporary Aliases

$ alias shortName="your custom command here"
$ alias wr=”cd /var/www/html”

Creating Permanent Aliases

$ nano ~/.bashrc
#My custom aliases 
alias home=”ssh -i ~/.ssh/mykep.pem tecmint@192.168.0.100” 
alias ll="ls -alF"

Remove an alias added via the command 

$ unalias alias_name
$ unalias -a [remove all alias]

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.