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/profile
is set by the system administrator.~/.bash_profile
is where the user can set customizations. This file usually focuses on environment variables. The.bash_profile
script should normally source the~/.bashrc
file.
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
.