每天一点Linux --- 关于/etc/issue文件和自定义登录提示语

      man手册对/etc/issue文件的描述是:

      The file /etc/issue is a text file which contains a message or system identification to be printed before the login prompt. It may contain various @char and \char sequences, if supported by getty.

      如上所述,修改/etc/issue文件可以达到修改登录提示语的作用。修改并保存该文件之后,重启,重启完成之后,按组合键Ctrl+Alt+F1进入终端模式,你就可以看到修改之后的提示语了。

      /etc/issue - escape code

      The issue-file (/etc/issue or the file set with the -f option) may contain 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 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 " users" where is the number of current users logged in.

      \v : Insert the version of the OS, eg. the build-date etc.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值