UNIX FAQ Version 2.1 92/12/04 -- Question 5.6

UNIX FAQ Version 2.1 92/12/04 -- Question 5.6

What "dot" files do the various shells use?

From: wicks@dcdmjw.fnal.gov (Matthew Wicks) From: tmb@idiap.ch (Thomas M. Breuel) Date: Wed, 28 Oct 92 03:30:36 +0100 Although this may not be a complete listing, this provides the majority of information. csh Some versions have system-wide .cshrc and .login files. Every version puts them in different places. Start-up (in this order): .cshrc - always. .login - login shells. Upon termination: .logout - login shells. Others: .history - saves the history (based on $savehist). tcsh Start-up (in this order): /etc/csh.cshrc - always. /etc/csh.login - login shells. .tcshrc - always. .cshrc - if no .tcshrc was present. .login - login shells Upon termination: .logout - login shells. Others: .history - saves the history (based on $savehist). .cshdirs - saves the directory stack. sh Start-up (in this order): /etc/profile - login shells. .profile - login shells. Upon termination: any command (or script) specified using the command: trap "command" 0 ksh Start-up (in this order): /etc/profile - login shells. .profile - login shells. $ENV - always, if it is set. Upon termination: any command (or script) specified using the command: trap "command" 0 bash Start-up (in this order): /etc/profile - login shells. .bash_profile - login shells. .profile - login if no .bash_profile is present. .bashrc - interactive non-login shells. $ENV - always, if it is set. Upon termination: .bash_logout - login shells. Others: .inputrc - Readline initialization. zsh Start-up (in this order): .zshenv - always, unless -f is specified. .zprofile - login shells. .zshrc - interactive shells, unless -f is specified. .zlogin - login shells. Upon termination: .zlogout - login shells. rc Start-up: .rcrc - login shells