过程
我们知道设置终端登录提示在配置文件/etc/issue中配置。
首先使用帮助命令查看相关帮助。
man issue命令得出参照帮助
在使用帮助命令查看man agetty得出很多参数的帮助
下面介绍几个常见的参数
d Insert the current date.
插入当前日期。
s Insert the system name, thename of the operating system.
插入系统名称,操作系统的名称
l Insert the name of the current tty line.
插入当前终端登录名称
m Insert the architectureidentifier of the machine, eg. i486
插入计算机的体系结构的标识符,例如。 i486的
n Insert the nodename of themachine, also known as the hostname.
插入机器的节点名,也称为主机名
o Insert the NIS domainnameof the machine.
机器的NIS域名
O Insert the DNS domainnameof the machine.
计算机的DNS域名。
r Insert the release numberof the OS, eg. 1.1.9.
操作系统内核的版本号
t Insert the current time.
插入当前时间
u Insert the number ofcurrent users logged in.
将记录在当前的用户数
练习:
字符终端登录时,显示当前登录终端号,主机名和当前时间
转载于:https://blog.51cto.com/liaoxz/1830212