Command interpreters (or shells) are frequently a user's first point of contact with the computer, and they must therefore be rather friendly. Most of them use initialization scripts that allow configuration of their behavior (automatic completion, prompt text, etc.).
bash
, the standard shell, uses the /etc/bash.bashrc
initialization script for “interactive” shells, and /etc/profile
for “login” shells.
For bash
, it is useful to activate “automatic completion” in the /etc/bash.bashrc
file (simply uncomment a few lines).
In addition to these common scripts, each user can create their own ~/.bashrc
and ~/.bash_profile
to configure their shell. The most common changes are the addition of aliases; these are words that are automatically replaced with the execution of a command, which makes it faster to invoke that command. For instance, you could create the la
alias for the command ls -la | less
command; then you only have to type la
to inspect the contents of a directory in detail.
Setting default environment variables is an important element of shell configuration. Leaving aside the variables specific to a shell, it is preferable to place them in the /etc/environment
file, since it is used by the various programs likely to initiate a shell session. Variables typically defined there include ORGANIZATION
, which usually contains the name of the company or organization, and HTTP_PROXY
, which indicates the existence and location of an HTTP proxy.