Add path to $PATH

  1. Open the . bash_profile file in your home directory (for example, /Users/your-user-name/. bash_profile ) in a text editor.

  2. Add export PATH="your-dir:$PATH" to the last line of the file, where your-dir is the directory you want to add.

  3. Save the . bash_profile file.

  4. Restart your terminal.

Last updated