Linux基础知识之man手册的使用(3)

由于这个手册内容很多,所以我们使用/issue快速找到关于/etc/issue的相关内容作为参考。
connection and turn on auto-answer after 1 ring.)
            /sbin/agetty -w -I ’ATE0Q1&D2&C1S0=1\015’ 115200 ttyS1
 
ISSUE ESCAPES
      The issue-file (/etc/issue or the file set with the -f option) may con-
      tain certain escape codes to display the system  name,  date  and  time
      etc.  All  escape codes consist of a backslash (\) immediately followed
      by one of the letters explained below.
 
      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 num-
              ber of current users logged in.
 
      v      Insert the version of the OS, eg. the build-date etc.
 
      Example: On my system, the following /etc/issue file:
 
              This is \n.\o (\s \m \r) \t
 
      displays as
 
              This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30

这里我们找到\l可以解决显示当前登陆终端号问题,\n解决主机名问题,\t解决时间显示问题。既然找到了,那我们尝试修改/etc/issue文件。
#vi /etc/issue
CentOS release 6.8 (Final)
Kernel \r on an \m
\l       
\n
time is \t

wq保存退出。
logout

显示如下

Linux基础知识之man手册的使用

问题解决。

man的使用需要大家在平时的使用中慢慢摸索这样才会越用越得心应手。希望大家看了又所帮助。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/15127.html