gibbsie.org Knowledge Base

UNIX Shell Initialisation Files

Aug 7th 2008
No Comments
respond
trackback

C Shell Initialisation Files:

  1. Commands in /etc/.login are executed first.
  2. Commands in $HOME/.cshrc are executed. (also executed each time a new shell/CDE session is started)
  3. Shell executes commands in $HOME/.login file (usually terminal type/environment commands)
  4. Once the above is complete, the shell starts reading commands from the default input device, the terminal.
  5. If $HOME/.logout file exists, this is executed when the C shell terminates.

Bourne Shell Initialisation Files:

  1. Commands in /etc/profile are executed first.
  2. Commands in $HOME/.profile are executed (usually terminal type/environment commands)
  3. Once the above is complete, the shell starts reading commands from the default input device, the terminal.

Korn Shell Initialisation Files:

  1. Commands in /etc/profile are executed first.
  2. Commands in $HOME/.profile are executed (usually terminal type/environment commands)
  3. If present, commands in $HOME/.kshrc are executed. This file gets read each time a new Korn shell is started after login.
  4. Once the above is complete, the shell starts reading commands from the default input device, the terminal.

This post is tagged , , , , , , ,

No Comments

Leave a Reply