Here is the video version, if you prefer it:
alias command is used to construct your own commands which are made out of existing commands. (Shotts, 2019) Here is an example of how it is used:
mislav@mislavovo-racunalo:~$ alias ll='ls -l'
drwxr-xr-x 27 mislav mislav 4096 Sep 19 14:00 anaconda3
drwxr-xr-x 26 mislav mislav 4096 Dec 30 00:40 'Calibre Library'
drwxr-xr-x 2 mislav mislav 4096 Aug 25 12:21 Desktop
drwxr-xr-x 26 mislav mislav 4096 Jan 16 09:38 Documents
Its syntax is as follows:
Be wary of the spaces – there are no spaces between
As you can see, you can create your own commands with
alias. More specifically, you are creating an alias for an existing (or a sequence of existing) commands – hence the name.
Some notes: make sure not to alias an existing command name (check if the command name is used already with the
type command). Also, the alias you create will vanish when you exit your Terminal session. That is a topic for another post.
Hope you learned something useful!
Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Page 74-76