Linux系統登入歡迎辭

來源:互聯網
上載者:User

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!”,也可以警告一下對系統圖謀不軌的“壞傢伙”。 通過配置這兩個文本,可以定製登入時的個人化資訊,如果再配上指令碼來處理,就可以實現動態顯示更多內容,比如說時間提醒、系統公告等,那就更有意思了! 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.