PDA

View Full Version : Setting system variable



defkewl
April 20th, 2005, 04:52 AM
How do I set up new system variable in Ubuntu?

I already wrote it in /etc/profile and /home/*/.bash_profile but the variable didn't came out when I echoed it from the console. I even reboot my computer since changing session didn't even worked when I echoed it.

I wrote this variable:
JAVA_HOME="/usr/local/jdk1.5.0_01"
PATH="$PATH:$JAVA_HOME/bin"

It worked on other distro but it didn't work on my Hoary?

Anybody could help me on this?

Thnx in advance.

heimo
April 20th, 2005, 04:55 AM
Try putting export in front of those lines. It's actually more shell feature than distribution specific.

panickedthumb
April 20th, 2005, 06:19 AM
yes, you need export in front of those lines. I'm not sure I've used a distribution that worked differently.

defkewl
April 20th, 2005, 02:46 PM
I've got it now guys.

Actually in Ubuntu it is writeen in /etc/bash.bash_profile

Hopefully this is useful for those facing the same problem with me ;)