Initialization files execute a series of commands when the shell is started. These files customize the environment for the system and the user.

The following are the two levels of initialization files:

  1. System-wide initialization files that affect all users of the system. These are located in the /etc directory and are maintained by a system administrator


  2. User-specific initialization files that affect only one specific user. These are located in the user's home directory.

The following table outlines user-specific initialization files:

Bash Shell

System-Wide
(Read First)

User-Specific
(Read Second)

Bash 1. /etc/profile

2. HOME/.bash_profile

3. HOME/.bashrc