登陸式shell與非登陸式shell

登陸式shell:
su – username
su -l username

非登陸式shell:
su username
圖形終端下打開命令窗口
自動執行的shell腳本

bash的配置文件
全局配置:
    /etc/profile,/etc/proflie.d/*.sh,/etc/bashrc
我的配置:
    ~/.bash_profile,~/.bashrc

profiles類配置文件:
    設定環境變量,運行命令或腳本

bashrc類配置文件:
    設定本地變量,定義命令別名

登陸式shell如何讀取配置文件:
    /etc/profile,/etc/profile.d/*.sh,~/.bash_profile,~/.bashrc,/etc/bashrc
非登陸式shell如何讀取配置文件:
    ~/.bashrc,/etc/bashrc,/etc/profile.d/*.sh
shell

相關文章
相關標籤/搜索