成功登录系统后有一些消息显示。
例如(如果系统运行的是 Ubuntu)
"The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To access official Ubuntu documentation, please visit: http://help.ubuntu.com/"
该消息称为“今日消息”,又名 motd。
它是 /etc/motd 中的文本文件存储,但在 Linux 上被替换为 /etc/motd.tail 中的副本。
使用 vi 或者我们选择的其他编辑器使用我们想要的消息更改文件。
以下是一些转义码以显示一些添加信息:
\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. _= Insert the number of current users logged in. _= Insert the string "1 user" or "<n> users" where <n> is the number of users login.
日期:2020-06-02 22:17:24 来源:oir作者:oir