在使用文本設備(關於文本設備的例子,見下面的說明)登錄Linux系統之前,系統會顯示一條被稱作“issue”的消息:
- 若是通過本地文本設備(如本地終端,本地虛擬控制台等)登錄,則該信息存放與/etc/issue文件中;
- 若是通過遠程本文設備(如通過ssh或telnet等)登錄,則該信息存放與/etc/issue.net文件中。
1. 第一映像:
unimous@unimous-f41:~$ cat /etc/issue
Ubuntu 11.10 \n \l
unimous@unimous-f41:~$ cat /etc/issue.net
Ubuntu 11.10
2. \n \l 是什么?
在/etc/issue文件中,允許使用轉義序列(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. n Insert the nodename of the machine, also known as the hostname. o Insert the NIS domainname of the machine. O Insert the DNS 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 "<n> users" where <n> is the number of current users logged in. v Insert the version of the OS, eg. the build-date etc.
3. 關於issue.net的說明:
首先,issue.net中不能存在escape sequence;
其次,使用ssh登錄時,會不會顯示issue信息由ssh的配置決定。