954,249 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

variable environment

i try t set up a variable environment but i have problem.

as root i do "name variable"=name variable; export name variable;
PATH=.....

but when i do reboot the variables is not there.i don't know how to save a variable.
Do yoy have any suggestions?

nik-
Newbie Poster
8 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

Depends on what shell you using. The variable that is being changed needs to be included in the startup "script" that the shell uses.

If appending, you can do this: PATH=$PATH:/foo/bar , but if you are prefixing do this: PATH=/foo/bar:$PATH .

Anyway, the following is a quick break down of what might need to be touched:

csh
.login
.cshrc

sh/ksh
.profile

bash
.bash_profile
.bash_login
.profile

Definitely check your shell docmentation for details though.

mittelgeek
Light Poster
37 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: