歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Linux系統登錄歡迎辭

Linux系統登錄歡迎辭

日期:2017/3/1 14:44:27   编辑:關於Linux
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 name O 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!”,也可以警告一下對系統圖謀不軌的“壞家伙”。 通過配置這兩個文本,可以定制登錄時的個性化信息,如果再配上腳本來處理,就可以實現動態的顯示更多內容,比如說時間提醒、系統公告等,那就更有意思了!
Copyright © Linux教程網 All Rights Reserved