1. Home
  2. Computing & Technology
  3. Linux

Introduction to Linux

From Machtelt Garrels, for About.com

7.2.2. Shell setup files

When entering the ls -al command to get a long listing of all files, including the ones starting with a dot, in your home directory, you will see one or more files starting with a . and ending in rc . For the case of bash , this is .bashrc . This is the counterpart of the system-wide configuration file /etc/bashrc .

When logging into an interactive login shell, login will do the authentication, set the environment and start your shell. In the case of bash , the next step is reading the general profile from /etc , if that file exists. bash then looks for ~/.bash_profile , ~/.bash_login and ~/.profile , in that order, and reads and executes commands from the first one that exists and is readable. If none exists, /etc/bashrc is applied.

When a login shell exits, bash reads and executes commands from the file ~/.bash_logout , if it exists.

This procedure is explained in detail in the login and bash man pages.

* License

* Introduction to Linux Index

Explore Linux

More from About.com

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux Documentation
  5. Introduction to Linux
  6. Introduction to Linux - 7.2.2. Shell setup files

©2008 About.com, a part of The New York Times Company.

All rights reserved.