linux bash配置檔案詳解

2021-12-30 11:46:34 字數 745 閱讀 9345

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 系統整體的配置檔案,對所有登入...

配置檔案詳解

config目錄下有2個配置檔案 es的配置檔案 elasticsearch.yml 和日誌配置檔案 logging.yml cluster.name elasticsearch 配置es的集群名稱,預設是elasticsearch,es會自動發現在同一網段下的es,如果在同一網段下有多個集群,就可...

OpenSSH 配置檔案詳解

第1章 openssh 安全網路通訊 本章要點 關於openssh openssh客戶端 起步 使用ssh和scp openssh伺服器sshd 起步 啟動sshd守護程序 授權金鑰 自動化登入 故障診斷 隧道技術與埠 openssh是一套安全網路連線工具,用來取代telnet rcp rsh rs...