Introduction to Unix |
|
|
|
5.1. BASH Shell StartupΒΆ
When you first login and a BASH shell process is started, it reads two configuration files to set shell attributes and environment variable.
/etc/profileis set by the system administrator.~/.bash_profileis where the user can set customizations. This file usually focuses on environment variables. The.bash_profilescript should normally source the~/.bashrcfile.
Child shells to the login shell will inherit exported environment variables. These shells will source
~/.bashrc, but not~/.bash_profile. Aliases and shell options are normally set in~/.bashrc.