關于CentOS的/etc/profile和~/.bash_profile及.zshrc – ma_fighting

下面由centos使用教程欄目給大家介紹centos的/etc/profile和~/.bash_profile及.zshrc – ma_fighting,希望對需要的朋友有所幫助!

關于CentOS的/etc/profile和~/.bash_profile及.zshrc – ma_fighting

交互式登陸shell

對于交互式的登陸shell而言,CentOS規定了startup文件的加載順序如下:

登陸過程:
1. 讀取并執行/etc/profile文件;
2. 讀取并執行~/.bash_profile文件;
– 若文件不存在,則讀取并執行~/.bash_login文件;
– 若文件不存在,則讀取并執行~/.profile文件;

登出過程:
1. 讀取并執行~/.bash_logout文件;
2. 讀取并執行/etc/bash.bash_logout文件;

.zshrc ? source后只會在當前窗口生效

更多centos技術文章,請訪問centos使用教程欄目!

? 版權聲明
THE END
喜歡就支持一下吧
點贊8 分享