Quick reference: set path, mac

To set path in mac, use the following commands

1. Check current PATH settings

echo $PATH

 

2. Set PATH temporarily

export PATH=$PATH:/path/

 

3. Set PATH permanently for USER

pico ~USER/.bash_profile

(insert this line to the file)  PATH=$PATH:/path/

 

4. Set PATH for All Users on the mac

sudo pico /etc/paths

(insert this line to the file)  PATH=$PATH:/path/

發表留言