Create a Bash Alias in OSX/MacOS

Assalamualaikum,

When I bought my Mac, the .bash_login file wasn’t there. I need to create it for myself so that I could put prompt info, alias, functions, etc. in it.

Here are the steps if you would like to create one:

  1. Start up Terminal
  2. Type cd ~/ to go to your home folder
  3. Type touch .bash_profile to create your new file.
  4. Edit .bash_profile with your favorite editor (or you can just type open -e .bash_profileto open it in TextEdit.
  5. Type . .bash_profile to reload .bash_profile and update any alias you add.

wassalam..

Advertisements
This entry was posted in Mac, MacOS, OSX, UNIX and tagged , , , . Bookmark the permalink.