shell
登陸型 session
, 也就是需要輸入 user name
和 password
的 session。
起因:最近在看 zookeeper bin
下的一系列 shell 腳本。發現還真有好多東西值得琢磨的。
login shell 使用哪些配置文件?
一定會使用 /etc/profile
和 /etc/profile.d
(這個文件夾有一系列 shell 腳本)
如上圖一共有三種情況:
- 當前用戶
Home
目錄找到了.bash_profile
,至此結束。不會執行2
或者3
。找不到.bash_profile
進入2
。 - 當前用戶
home
目錄找到了.bash_login
,至此結束。不會執行3
。找不到.bash_login
進入3
。 - 當前用戶
home
目錄有.profile
,.profile
會調用.bashrc
。