Creating Aliases on Linux and Mac

What are aliases?

An alias is just a fancy term for nicknaming a certain command.

Editing the “.bashrc” File

The first step in creating aliases is to open up a new terminal window and head over to your user’s directory like so:

sudo nano .bashrc

Creating Aliases

Inside of the “/home/<username>” directory, you’ll want to create a new file called “.bash_aliases.” You can do so with the following command:

touch .bash_aliases
sudo nano .bash_aliases
source ~/.bashrc

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store