Aliases are a way for you to customize the commands by giving them aliases (nicknames). You can use them to remember hard commands or make short names to long commands you just hate to type.
Aliases are nothing more than keyboard shortcuts or abbreviations, and although they’re a bit limited, they’re great for simple commands.
Let’s create a temporary alias in the command line for
ls -al (list all files in long listing format in the current directory). Open Terminal and run the following command:
alias ll="ls -al"
Note: There should be no spaces before or after the equal sign. Spaces will break the command.
Now if you type
ll in the command line, you should see something like the following: (more…)