Create custom commands in Linux (aka alias)

Let’s say you are using some of the commands frequently and you don’t want to type the whole command everytime. An alternative is to create a short command for it and use that instead.
First, go to the home folder in the terminal which looks like the following
/home/username
In case if you are in some other directory, you can type ~ in terminal and press Enter to get there
Next, you can list the contents of that directory including the hidden files using
ls -a
Here, -a is to show hidden files which start with dot
Among the list of files, find .bashrc and open it
At the end of the file, add some custom commands by using alias.
alias [custom command name]=’[original command]
Here is an example. You can create any number of custom commands here
After entering the custom commands, close the terminal and open a new one.

Comments

Popular posts from this blog

Pentaho ETL

Copy files from one computer to other using ‘scp’ command