Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-13-2005, 09:45 PM
|
#1
|
Member
Registered: Nov 2003
Location: Cebu, Philippines
Distribution: Ubuntu
Posts: 73
Rep:
|
problems setting up PATH in ubuntu
hello
I'm having problems setting up my path in ubuntu
i edited the .bash_profile and put a PATH=$PATH:/opt/java
i expected the /opt/java would be in my PATH the next time i logged in, but to my disappointment, when I did an "env" it still wasn't included.
i also tried editing the /etc/profile and it also didn't work, even if I reset my pc.
but when I just do the setting up on the command line, it went well.
so i tested writing a simple test.sh which contains a "PATH=$PATH:/opt/java". when i executed it, it also didn't work. my path variable is still the same.
why is this?
|
|
|
01-13-2005, 10:04 PM
|
#2
|
Member
Registered: Jan 2005
Distribution: Gentoo/Vector/Debian
Posts: 95
Rep:
|
try:
export PATH="$PATH:/opt/java"
|
|
|
01-13-2005, 10:17 PM
|
#3
|
Member
Registered: Nov 2003
Location: Cebu, Philippines
Distribution: Ubuntu
Posts: 73
Original Poster
Rep:
|
thanks but it still doesn't work.
did an "env" and /opt/java still wasnt there. also did the test.sh.
could this be a bug in ubuntu?
|
|
|
01-13-2005, 10:24 PM
|
#4
|
Member
Registered: Jan 2005
Distribution: Gentoo/Vector/Debian
Posts: 95
Rep:
|
You know you can do echo $PATH for the path too.
Are you using bash??
|
|
|
01-14-2005, 01:05 AM
|
#5
|
Member
Registered: Nov 2003
Location: Cebu, Philippines
Distribution: Ubuntu
Posts: 73
Original Poster
Rep:
|
yes I'm using bash.
hm... I just tried it in Suse and it also wont work there, so I gues its not an ubuntu bug.
Hey thanks for the echo $PATH tip. thats so much easier.
ok i tried writing this simple shell test.sh
PATH=$PATH:/home
export PATH
then i executed it by inputting on the prompt - "sh test.sh"
then i did an "echo $PATH"
heres the output -
/home/lemuel/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin
there's no /home in the path
|
|
|
01-14-2005, 09:26 AM
|
#6
|
Member
Registered: Jan 2005
Distribution: Gentoo/Vector/Debian
Posts: 95
Rep:
|
OH silly me . . . you forgot to put it in quotes!
export PATH="$PATH:/home"
that should do it.
|
|
|
01-14-2005, 11:03 PM
|
#7
|
Member
Registered: Nov 2003
Location: Cebu, Philippines
Distribution: Ubuntu
Posts: 73
Original Poster
Rep:
|
still no good. but thanks anyway. i guess setting paths is just not for me
|
|
|
01-14-2005, 11:51 PM
|
#8
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
Put some echo commands into .bash_profile to make sure it is run correctly. Also, remember that .bash_profile is only run on login shells. Nonlogin shells, like new xterms, do not run .bash_profile, but run .bashrc instead. I usually just have .bash_profile invoke .bashrc to get a consistent environment in login and nonlogin shells.
|
|
|
All times are GMT -5. The time now is 01:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|