Mengetahui urutan eksekusi variabel lingkungan untuk OS Shell yang berbeda sangat penting bagi administrator sistem. Ini mungkin berguna untuk menyiapkan tugas cron atau untuk memahami perbedaan perintah yang dijalankan di shell interaktif vs tugas batch menggunakan shell non-interaktif.
1. Cangkang:CSH
Mulai (pesan):
--> .cshrc (always) --> .login (login shells)
Penghentian:
--> .logout (login shells)
Lainnya:
.history (saves history based on "$savehist")
2. Kulit:tcsh
Mulai (pesan):
--> /etc/csh.cshrc (always) --> /etc/csh.login (login shells) --> .tcshrc (always) --> .cshrc (if no .tcshrc file is present) --> .login (login shells)
Penghentian:
-->.logout (login shells)
Lainnya:
--> .history (saves history based on "$savehist") --> .cshdirs (saves directory stack)
3. Kulit:sh
Mulai (pesan):
--> /etc/profile (login shells)
Penghentian:
Any command or script specified using the command: trap "command" 0
Lainnya:
--> .profile (login shells)
4. Kulit:ksh
Mulai (pesan):
--> /etc/profile (login shells) --> .profile (login shells) --> $ENV (always, if it is set)
Penghentian:
Any command or script specified using the command: trap "command" 0
5. Shell:bash
Mulai (pesan):
--> /etc/profile (login shells) --> .bash_profile (login shells) --> .profile (login if no .bash_profile file is present) --> .bashrc (interactive non-login shells) --> $ENV (non-interactive shells)
Penghentian:
--> .bash_logout (login shells)
Lainnya:
--> .inputrc (readline initialization)
6. Kulit:zsh
Mulai (pesan):
--> .zshenv (always, unless the -f option is specified) --> .zprofile (login shells) --> .zshrc (interactive shells, unless the -f option is specified) --> .zlogin (login shells)
Penghentian:
--> .zlogout (login shells)