Prev | Current Page 192 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

It is executed only once, when the user logs in. By default it sets a few
environment variables and executes the user??™s .bashrc file.
~/.bashrc Contains the information that is specific to your bash shells. It is read when you log
in and also each time you open a new bash shell. This is the best location to add
environment variables and aliases so that your shell picks them up.
~/.bash_logout Executes each time you log out (exit the last bash shell). By default, it simply clears
your screen.
To change the /etc/profile or /etc/bashrc files, you must be the root user. Users can change
the information in the $HOME/.bash_profile, $HOME/.bashrc, and $HOME/.bash_logout
files in their own home directories.
The following sections provide ideas about items to add to your shell configuration files. In
most cases, you add these values to the .bashrc file in your home directory. However, if you
administer a system, you may want to set some of these values as defaults for all of your Linux
system??™s users.
Setting Your Prompt
Your prompt consists of a set of characters that appear each time the shell is ready to accept a command.
The PS1 environment variable sets what the prompt contains and is what you interact with
most of the time. If your shell requires additional input, it uses the values of PS2, PS3, and PS4.


Pages:
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204