To make aliases of macOS Unix commands in your bash or zsh shell on macOS and earlier versions, it is done via your .bash_profile or .zsh file which lives in your home account directory, if the file does not already exist, just create one.
As of macOS 10.6 Catalina, Apple has made the zsh shell the default shell, previously it was the bash shell.

If I remember correctly, when I had bought my Mac, the.bashlogin file wasn't there. I had to create it for myself so that I could put prompt info, alias, functions, etc. edit.bashaliases file and restart terminal or print source /.bashaliases. Here’s how you create persistent aliases in your terminal: Open your terminal emulator of choice. I favor iTerm 2 on the Mac. Macs and most Linux distributions come with one called “Terminal”. (I don’t know enough about Windows to be helpful there.) Type sudo nano /.bashrc in your BASH terminal window. This will open up the Nano text.

Launch Terminal from the /Application/Utilities folder
Go to your home directory by just entering cd followed by the ‘return’ key to enter the command:
List your home directory contents including invisible files to see if the file already exists, use:

Focusrite scarlett 2i2 driver for mac. Create the .bash_profile or .zsh file using the command line program called ‘nano’ if it doesn’t exist:
When the .bash_profile or .zsh file is created you are ready to enter your alias commands.
So here I am using the alias ‘l’ to alias the command ‘ls -lah’
Mac Alias File

In nano ‘control+o’ to write the file out and ‘control+x’ to exit the file.
Mac Os Alias
Refresh the shell environment by entering the command below:

Or.
That’s it, now the alias will take effect.
Alias File Mac Terminal
To add other aliases just start a new line, and apply the same formatting.
