Aliases are great and can make your life in the terminal easy. They give you a way to shorten multi-part or long commands into a single command. For example, if you’re always navigating to a certain directory like /home/username/this/directory, then you can more quickly chance to that directory by using a single command. Here’s what the alias for that would look like:
alias mydir='cd /home/username/this/directory/'
Now, whenever you type
mydir, it will take you to /home/username/this/directory.
When you no longer need or want an alias, you can remove it using
unalias. Here’s how to remove the example we just made above: