11
Oct

Creating and Removing Aliases

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:

unalias mydir

As always, for more information on aliases refer to the man pages: alias, unalias.

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 0 Comment So Far

Share your thoughts, leave a comment!