3
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by John A
0

/etc/profile for "world" wide variables. The basic PATH and sometimes TMOUT is usually set here.

.bashrc or .profile for a given user or yourself.
Edit the file and add something like:

export MYVAR="SOME VALUE"

Save the file, then source it

source .bashrc 
# or
source .profile

That what you mean?

0

You can also set a variable temporarily by just going:
MYVAR="something"
The variable will be reset as soon as you reboot/restart.

0

/etc/profile is something like a bash script. Can you guide me where exactly to put the statement you mentioned?

0

/etc/profile is something like a bash script. Can you guide me where exactly to put the statement you mentioned?

You should see a lot (or a few) paths seperated by colons. Place the path you want to at the end, prefixed by a colon.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.