/etc/issue
Centos有6个控制台,这就好比一个房子有6个门,随便哪一扇都能进入,可以通过Ctrl+Alt+(F1~F6)进行切换。
我们随意切换控制台,会发现如下信息

标红部分就是登录系统前的信息,这个一般书写一些系统的硬件配置信息,可以在/etc/issue中进行配置,具体我们可以通过 man issue 来查看
\d insert current day (localtime),
\l insert line on which mingetty is running,
\m inserts machine architecture (uname -m),
\n inserts machine’s network node hostname (uname -n),
\o inserts domain name,
\r inserts operating system release (uname -r),
\t insert current time (localtime),
\s inserts operating system name,
\u resp. \U the current number of users which are currently logged in. \U inserts "n
users", where as \u only inserts "n".
\v inserts operating system version (uname -v).
/etc/motd
motd = message of the today
The contents of /etc/motd are displayed by login(1) after a successful login but just before it executes the login shell.
在登录成功之后显示的消息,常常通过这个来通知一些服务器的通知,比如xxx时间服务器关闭进行数据同步、系统维护等等
# /etc/motd
Hello everyone, welcome to www.jld.com
Our server will be maintained at 2015/01/20 0:00 ~ 24:00

本文介绍CentOS系统中6个控制台的切换方法及/etc/issue和/etc/motd文件的用途。通过这些文件可以配置系统登录前显示的信息,如硬件配置和系统维护通知等。
1342

被折叠的 条评论
为什么被折叠?



