A guide to creating a .bash_profile in macOS

--

Before creating a .bash_profile, check if the file already exists by typing this command in the terminal:

open .bash_profile

If the file doesn’t exist, follow these steps to create it:

  1. Open the terminal and go to the home directory with:
cd ~/

2. Create the .bash_profile file with:

touch .bash_profile

If the file doesn’t exist, this command will create the .bash_profile file for you.

--

--