Reputation: 1173
I've been struggling with "PATH" issues while setting up Rails and other things on Mac for a long time now, and I can't get a straight answer about how I can just see my $PATH and change it. I'm just running the Terminal right now, but if I need to run another program to run Bash commands or something I can probably figure out how to do that.
Upvotes: 4
Views: 21281
Reputation: 42028
Execute the following command in Terminal to view the current value of PATH
:
echo $PATH
To modify this PATH
variable, create a .bash_profile
file in your home directory (/Users/username/.bash_profile
) and add a line similar to this:
export PATH=$PATH:/new/directory/location
Upvotes: 7
Reputation: 713
type:
echo $PATH
You can check your .bash_profile file and edit $PATH variable there. If that file does not exists then you can create a new one and you can export PATH there using:
export PATH=/usr/local/bin:/usr/local/mysql/bin:$PATH
Upvotes: 0