Page 1 of 1

PATH environment variable

Posted: Tue Jan 05, 2010 2:41 am
by chinagreen
I set the path using the following command:

export PATH=$:/var/lib/gems/1.8/bin

However, I'm missing /usr/bin. Tried using a comma, but the path isn't working. Suggestions???
My current path is:

$:/var/lib/gems/1.8/bin,/usr/bin

It isn't working, however.

Thanks.

Re: PATH environment variable

Posted: Tue Jan 05, 2010 6:13 am
by moodywoody
Using a colon instead of a comma should do the trick.

Code: Select all

export PATH=$PATH:/newpath1:/new/path2

Re: PATH environment variable

Posted: Tue Jan 05, 2010 4:12 pm
by chinagreen
Your suggestion was my solution! Thanks.

export PATH=$PATH:/usr/bin:/var/lib/gems/1.8/bin

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/bin:/var/lib/gems/1.8/bin