天天看點

linux 歡迎界面

開博第一篇文章,簡單地寫一篇linux歡迎界面吧

可以通過修改/etc/motd 或/etc/issue兩個檔案實作修改登入顯示

差別:/etc/motd:( 登入成功才會顯示 )

        /etc/issue :(本地登入前在login前顯示)

/etc/motd:即messageoftoday布告欄資訊  

linux 歡迎界面
   預設該檔案中沒有内容,編輯該檔案資訊
************************[ WARNING ]***********************
Authorised access only

This system is the property of *******
Disconnect IMMEDIATELY if you are not an authorized user!
Your IP has been IDS records Don't damage any files!
IF YOU HAVE ANY PROBLEM,PLEASE CONTACT ME :  ******      

     exit後重新登入該裝置,顯示生效。

linux 歡迎界面

/etc/issue: 本地序列槽登入前的顯示欄

cat /etc/motd >> /etc/issue      

   通過本地序列槽tty登入伺服器

linux 歡迎界面
配置現實也正常。

issue 内的各代碼意義

本地端時間的日期;

\l 顯示第幾個終端機接口;

\m 顯示硬體的等級 (i386/i486/i586/i686...);

\n 顯示主機的網絡名稱;

\o 顯示 domain name;

\r 作業系統的版本 (相當于 uname -r)

\t 顯示本地端時間的時間;

\s 作業系統的名稱;

\v 作業系統的版本.

簡單的修改下issue檔案,不要透露太多資訊,尤其是核心版本
cat << EOF > /etc/issue
> DATE: \d
> ServerName: \s
> EOF      

繼續閱讀