bash的配置文件以及加载的顺序
生活随笔
收集整理的這篇文章主要介紹了
bash的配置文件以及加载的顺序
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
站在用戶登錄的角度看待shell的類型:
登錄式shell
1 正常登錄
2 su - username
3 su -l username
非登錄式shell
1 su username?
2 自動執(zhí)行的shell腳本
全局配置文件
/etc/profile
/etc/profile.d/*.sh
/etc/bashrc
局部配置文件
~/.bash_profile
~/.bashrc
profile類的配置文件:
1 配置全局環(huán)境變量
2 一登錄執(zhí)行的命令或腳本
bash類的配置文件:
1 配置本地變量
2 定義命令別名
登錄式shell加載配置文件的順序:
/etc/profile
/etc/profile.d/*.sh
~/.bash_profile
~/.bashrc
/etc/bashrc
非登錄式shell加載配置文件的順序:
~/.bashrc
~/.bash_profile
/etc/profile.d/*.sh
登錄式shell
1 正常登錄
2 su - username
3 su -l username
非登錄式shell
1 su username?
2 自動執(zhí)行的shell腳本
bash配置文件:
全局配置文件
/etc/profile
/etc/profile.d/*.sh
/etc/bashrc
局部配置文件
~/.bash_profile
~/.bashrc
profile類的配置文件:
1 配置全局環(huán)境變量
2 一登錄執(zhí)行的命令或腳本
bash類的配置文件:
1 配置本地變量
2 定義命令別名
登錄式shell加載配置文件的順序:
/etc/profile
/etc/profile.d/*.sh
~/.bash_profile
~/.bashrc
/etc/bashrc
非登錄式shell加載配置文件的順序:
~/.bashrc
~/.bash_profile
/etc/profile.d/*.sh
總結(jié)
以上是生活随笔為你收集整理的bash的配置文件以及加载的顺序的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: RPC + NFS
- 下一篇: SUID + SGID + STICKY