linux bash配置檔案

2021-08-19 18:14:56 字數 746 閱讀 4708

1、login shell 和non-login shell

顧名思義,login shell就是要輸入使用者名稱和密碼才能啟動的shell,non-login shell不需要重複登入就能啟動shell。

2、login shell環境配置檔案

/etc/profile: 系統整體的配置檔案,對所有登入的使用者有效。

/etc/profile會呼叫的配置檔案:

/etc/inputrc:設定熱鍵等資訊;

/etc/profile.d/*.sh: 操作介面、語言習慣、公共命令的別名等;

/etc/sysconfig/i18n: /etc/profile.d/*.sh呼叫,配置語系。

~/.bash_profile: 個人配置檔案

~/.bash_login: 個人配置檔案

~/.profile: 個人配置檔案

優先順序:~/.bash_profile>~/.bash_login>~/.profile

如果~/.bashrc存在: ~/.bash_profile-->~/.bashrc-->~/.bashrc-->/etc/bashrc-->/etc/profile.d/*.sh-->/etc/sysconfig/i18n

3、non-login shell 環境配置

配置~/.bashrc

呼叫順序:~/.bashrc-->~/.bashrc-->/etc/bashrc-->/etc/profile.d/*.sh-->/etc/sysconfig/i18n

linux bash配置檔案詳解

1 login shell 和non login shell 顧名思義,login shell就是要輸入使用者名稱和密碼才能啟動的shell,non login shell不需要重複登入就能啟動shell。2 login shell環境配置檔案 etc profile 系統整體的配置檔案,對所有登入...

drbd配置檔案 drbd配置檔案

drbd配置檔案 vim usr local drbd etc drbd.d global common.conf global usage count yes 是否參加drbd使用者統計 common protocol c 使用drbd的第三種同步協議 disk 使用dpod功能保證在數 on i...

Spring配置檔案載入外部配置檔案

有時,應用程式可能需要從不同的位置 例如 檔案系統 classpath或者url 讀取外部資源 例如 文字檔案 xml檔案 屬性檔案或或者影象檔案 通常,為了從不同位置載入資源,需要和不同的api打交道。spring的資源載入器提供了乙個統一的getresource 方法,使用這個方法可以通過資源路...