User level settings – default files

Scripts in the /etc/ folder will be called for all users. Particular, user-specific initialization scripts are located in the HOME folder of each user. These are as follows:

  • $HOME/.bash_profile: This contains user-specific bash environment default settings. This script is called during the login process.
  • $HOME/.bash_login: This contains the second user environment initialization script called during the login process.
  • $HOME/.profile: If present, this script internally calls the .bashrc script file.
  • $HOME/.bashrc: This is an interactive shell or terminal initialization script.

All the preceding script names start with a dot. These are hidden files. We will need to give the ls -a command to view these files. ...

Get Learning Linux Shell Scripting - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.