/etc/issue 与 /etc/issue.net 文件,telnet登陆前的显示
在使用文本设备(关于文本设备的例子,见下面的说明)登录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的配置决定。