Adding PATH

TO add a PATH to the existing one.

For Mac:

$ open -a TextEdit ~/.bash_profile
export PATH=/path/to/the/folder:$PATH

$ source ~/.bash_profile
$ echo $PATH

Add the export line into the .bash_profile. Use the source command to update the path and use echo command to verify the path has been added.

Similarly, using vi/m, gedit or other text editor, add the export line into ~/.bash_profile the same way in Linux.

HINT: use \ in front of space to include them if they are part of the folder name.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s