What are those dot files (.***) in my home directory?


  
Dot files (.***) are system configuration files for your shell, x-window, desktop, mail, etc., i.e., your personal settings that your default shell reads when you log in to your account. It is extremely important when you make any change in your dot file(s), which is not recommended, make a backup first, then make modification.

Normal 'ls' command will not list dot files unless you're using additional flags. Thus dot files are also called as 'hidden' files.

Name and type of dot files used by your login shell will be little bit different depending on which shell you use.

Your login shell Executed in Dot files
csh Start-up
(in this order)
.cshrc - always; unless the -f option is used
.login - login shells
csh Upon termination
.login - login shells
csh Others
.history - saves the history (based on $savehist)
ksh Start-up
(in this order)
/etc/profile - login shells
.profile - login shells; unless the -p option is used
.kshrc- always
$ENV- always, if it is set; unless the -p option is used
/etc/suid_profile- when the -p option is used
ksh Upon termination
trap "command" 0 - any command (or script) specified using this command
sh Start-up (in this order)
/etc/profile - login shells
.profile - login shells
sh Upon termination
/etc/profile - login shells
trap "command" 0 - any command (or script) specified using this command
bash Start-up
(in this order)
/etc/profile - login shells
.bash_profile - (user) login shells
.profile - login shells if no .bash_profile is present
.bashrc - interactive non-login shells
$ENV - always, if it is set
bash Upon termination
.bash_logout - login shells
bash Others
.inputrc - Readline initialization
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
tcsh Upon termination
.logout - login shells
tcsh Others
.history - saves the history (based on $savehist)
.cshdirs - saves the directory stack
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
zsh Upon termination
.zlogout - login shells
rc Start-up
.rcrc - login shells