Prev | Current Page 191 | Next

Christopher Negus

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

You can set aliases to save your keystrokes and permanently
set environment variables to suit your needs. To make each change occur when you start a shell,
add this information to your shell configuration files.
Configuring Your Shell
Several configuration files support how your shell behaves. Some of the files are executed for
every user and every shell, while others are specific to the user who creates the configuration file.
Table 2-5 shows the files that are of interest to anyone using the bash shell in Linux.
56
Linux First Steps Part I
TABLE 2-5
Bash Configuration Files
File Description
/etc/profile Sets up user environment information for every user. It is executed when you first
log in. This file provides values for your path, as well as setting environment
variables for such things as the location of your mailbox and the size of your history
files. Finally, /etc/profile gathers shell settings from configuration files in the
/etc/profile.d directory.
/etc/bashrc Executes for every user who runs the bash shell, each time a bash shell is opened. It
sets the default prompt and may add one or more aliases. Values in this file can be
overridden by information in each user??™s ~/.bashrc file.
~/.bash_profile Used by each user to enter information that is specific to his or her own use of the
shell.


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