用户登录(笔记)
站在用戶登錄的角度來說,SHELL的類型:
登錄式shell:
?? ?正常通常某終端登錄
?? ?su - USERNAME
?? ?su -l USERNAME
非登錄式shell:
?? ?su USERNAME
?? ?圖形終端下打開命令窗口
?? ?自動執行的shell腳本
?? ?
bash的配置文件:
全局配置
?? ?/etc/profile, /etc/profile.d/*.sh, /etc/bashrc
個人配置
?? ?~/.bash_profile, ~/.bashrc
?? ?
profile類的文件:
?? ?設定環境變量
?? ?運行命令或腳本
bashrc類的文件:
?? ?設定本地變量
?? ?定義命令別名
?? ?
登錄式shell如何讀取配置文件?
/etc/profile --> /etc/profile.d/*.sh --> ~/.bash_profile --> ~/.bashrc --> /etc/bashrc
非登錄式shell如何配置文件?
~/.bashrc --> /etc/basrc --> /etc/profile.d/*.sh
bash: 腳本解釋器
轉載于:https://www.cnblogs.com/jjzd/p/5767822.html
總結
- 上一篇: [ An Ac a Day ^_^ ]
- 下一篇: Codeforces626B - Car