linux /etc/issue 自定義提示登陸語

man手冊對/etc/issue文件的描述是:

      The file /etc/issue is a text file which contains a message or system identification to be printed before the login prompt. It may contain various @char and \char sequences, if supported by getty.

      如上所述,修改/etc/issue文件可以達到修改登錄提示語的作用。修改並保存該文件之後,重啓,重啓完成之後,按組合鍵Ctrl+Alt+F1進入終端模式,你就可以看到修改之後的提示語了。

      /etc/issue - escape code

      The issue-file (/etc/issue or the file set with the -f option) may contain certain escape codes to display the system name, date and time etc. All escape codes consist of a backslash (\) immediately followed by one of the letters explained below.

      \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. 插入當前tty的線路

      \m : Insert the architecture identifier of the machine, eg. i486  插入硬件信息

      \n : Insert the nodename of the machine, also known as the hostname. 插入主機名

      \o : Insert the domainname of the machine. 插入本機域名

      \r : Insert the release number of the OS, eg. 1.1.9. 插入操作系統版本

      \t : Insert the current time.   當前時間

      \u : Insert the number of current users logged in.  登陸用戶的數量

      \U : Insert the string "1 user" or " users" where is the number of current users logged in.插入“1用戶”或“用戶”,其中的當前用戶登錄的數字

      \v : Insert the version of the OS, eg. the build-date etc.插入版本的操作系統,如生成日期等


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章