Alias
Create a temporary alias
You can create a temporary alias that is valid only for the current session and will be forgotten by the system when you close the terminal window. To do this:
- Open a terminal window.
- Check if the name you’d like to give your alias is already being used by the system by typing this command, replacing name with the name you’d like to give the alias:
which name
Press the Enter key. If the name is already being used, repeat this step with another name as many times as needed to find one that isn’t being used.
- Type this command, replacing name with the name you chose and replacing command with the command you’d like the alias to perform:
alias name='command'
Press the Enter key.
- For example:
alias details='ls -l'
Now I can type details instead of ls -l to see a detailed listing of files in a directory.
Create a personal alias list (method 1)
To create your own alias list:
- Open a text editor and type the command for each alias on a separate line.
- Example:
- Save the file as .bash_aliases in your home directory (for example, /home/steve/.bash_aliases). Note that hidden files must be turned on in your file manager for this file to be visible.
- Close the text editor.
alias1='command1' alias2='command2' alias3='command3' alias4='command4'
Now any time you open a terminal window, the aliases you have defined will be available for you to use.
Create a personal alias list (method 2)
To create your own alias list:
- Open a text editor and type the command for each alias on a separate line.
- Example:
- Save the file as myaliaslist wherever you’d like to keep it. For the sake of this example, let’s say you saved it to the /home/username/ directory.
- Open the .bashrc file in your /home/username/ directory with a text editor. Note that hidden files must be turned on in your file manager for this file to be visible.
- Type this line at the bottom of the file to get Bash to use your alias list:
source /home/username/myaliaslist
- Save the file.
- Close the text editor.
alias1='command1' alias2='command2' alias3='command3' alias4='command4'
Now any time you open a terminal window, the aliases you have defined will be available for you to use.
Check which aliases you have defined
Type this command in a terminal window to check if you have any aliases defined in your .bashrc file:
alias
Obligatory Happy Ending
And they all lived happily ever after. The end.

Comment: