EnderUNIX Team.

EnderUNIX tips

Mail to My Friend , Home Page

[ Console ]

"Updating the environment variables" - Metin KAYA - (2007-05-13 01:34:11)   [6895]

On console, the environment variables (HOME, PATH, MAIL, HISTSIZE, ...) can be updated either user specific or session specific.
- The changes in the file "~/.bash_profile" will be user specific. For instance, to add a new path to PATH variable such as "/home/vpopmail/bin/", ":/home/vpopmail/bin/" should be appended the PATH line in the "~/.bash_profile" file. Another example: If you wonna the change your current mail directory, you should edit the line in the "~/.bash_profile" file which starts with "MAIL". If no such line exist, a line stating with "MAIL=/new/mail/directory/path" must be added the "~/.bash_profile" file.

- For session specific updates, "export" command is used (the changes will be invalid in the next session). For example:

# export PATH="$PATH:/home/vpopmail/bin"

command will add a path ("/home/vpopmail/bin") to your current PATH variable. More on examples:

# export PWD="directory_name"

command will changes the default login directory which a user login to the system.

* These commands are valid for bash shell.
* To activating the session specific changes, the user has to relogin the system.

Mail to My Friend , Home Page