Operating Systems > Linux and UNIX

add to path

(1/2) > >>

Master of Reality:
I searched but couldnt find the thread where this was already answered (a while back). How do I add directories to my path???

Master of Reality:

quote:
vi ~/.bash_profile
after
PATH=$PATH:$HOME/bin
add
:/whatever
--- End quote ---

---------------------
New Q:
whats the diff between /bin and /sbin ??

[ June 26, 2002: Message edited by: Master of Reality / Bob ]

[ June 26, 2002: Message edited by: Master of Reality / Bob ]

voidmain:
An interactive way is to:

export PATH=$PATH:/newdir1:/newdir2:etc

But you'll want to do this in your ~/.bash_profile.  Find the line that starts with "PATH" and add to it.

NOTE: Until you log off and back on the additions will not be recognized unless you do a ". ~/.bash_profile" in any new window/shell you open.

[ June 26, 2002: Message edited by: VoidMain ]

Master of Reality:
a little late, arent we VoidMain?

voidmain:
Damn you Bob!

Navigation

[0] Message Index

[#] Next page

Go to full version