Linux shell類型

一:站在用戶登錄的角度來說,SHELL的類型:

登錄式shell:
正常通常某終端登錄
su - USERNAME
su -l USERNAME
非登錄式shell:
su USERNAME
圖形終端下打開命令窗口



二: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



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章