Linux系統登入歡迎辭 /etc 檔案夾中有兩個設定檔 issue 和 issue.net,用於文本裝置登入系統時顯示的歡迎辭的格式。issue 是本地,不用多說,issue.net 肯定就是遠程啦! 這兩個檔案允許使用逸出序列(escape sequence),當系統遇到escape sequence的時候會自動替換成相應的資訊,比如:\n 代表主機名稱。完整的轉移序列列表如下(此列表摘自:man agetty,因為此issue由agetty負責解釋):b Insert the baudrate of the current line. d Insert the current date. 本地端的當前日期s Insert the system name, the name of the operating system. 作業系統的名稱l Insert the name of the current tty line. 顯示第幾個終端機的介面m Insert the architecture identifier of the machine, eg. i486. 顯示硬體的等級(i386/i486/i586/i686....)n Insert the nodename of the machine, also known as the hostname. 顯示主機的網路名稱o Insert the NIS domainname of the machine. 顯示 domain nameO Insert the DNS domainname of the machine. r Insert the release number of the OS, eg. 1.1.9. 作業系統的發行版本 (類似 uname-r)t Insert the current time. 本地端的目前時間u Insert the number of current users logged in. 登入的使用者數量U Insert the string "1 user" or "<n> users" where <n> is the number of current users logged in. v Insert the version of the OS, eg. the build-date etc.作業系統的版本 CentOS 中,兩個檔案的內容一致,如下:CentOS release 6.1 (Final)Kernel \r on an \m 系統登入成功後的歡迎辭則是:/etc/motd,“motd”是“Message Of ToDay”的縮寫,通常這個檔案是空的。* 在 CentOS 6.4 下,motd 檔案好像不支援逸出序列。我們可以通過配置這個檔案在使用者登入成功之後,跟目前使用者打個招呼:“Hello, welcome back!”,也可以警告一下對系統圖謀不軌的“壞傢伙”。 通過配置這兩個文本,可以定製登入時的個人化資訊,如果再配上指令碼來處理,就可以實現動態顯示更多內容,比如說時間提醒、系統公告等,那就更有意思了!