Environment variables (was: Re: File permissions?)
Tim Frost
timfrost at xtra.co.nz
Fri Dec 25 23:41:07 UTC 2009
On Fri, 2009-12-25 at 16:03 -0600, Jim Byrnes wrote:
> Tim Frost wrote:
> > [deleted]
>
> I wondered about the upgrading problem when I finally figured out where
> the install put everything. I was just starting to realize the reason
> for the stuff under home/ and now you post confirms it for me.
>
> You and other posters have mentioned enviromental variables like $HOME.
> In OS/2 they are set in config.sys, where are they set in Ubuntu?
On Unix/Linux, the environment variables for user sessions are set or
updated by a number of files that are processed during the login
process.
$HOME is set by the login program, from the home directory specified for
your account.
The PATH is built up by a number of scripts that are run during the
login process. Which scripts are run is influenced by:
* what shell is specified in the password file for your account
* whether this is an interactive shell
If you use bash, the login process will read any of the following files
that exist:
* /etc/profile
* /etc/bash_profile
* $HOME/.profile
* $HOME/.bash_profile
Those files are expected to be read once during login. They set up the
user environment. Note that /etc/bash_profile and $HOME/.bash_profile
are only read if the shell name is bash (because they usually have
bash-specific code that isn't part of the standard bourne shell syntax).
Other files are read every time a new bash shell program starts. These
are:
* /etc/bashrc
* $HOME/.bashrc
There are other files that are processed during a graphical login, to
set attributes that have meaning for that environment.
If you use one of the C shell variants, they use different files that
conform to the appropriate syntax.
>
> Thanks, Jim
>
Tim
--
Tim Frost <timfrost at xtra.co.nz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20091226/9d0c2b58/attachment.sig>
More information about the ubuntu-users
mailing list