在使用文本设备(关于文本设备的例子,见下面的说明)登录Linux系统之前,系统会显示一条被称作“issue”的消息:

  • 若是通过本地文本设备(如本地终端,本地虚拟控制台等)登录,则该信息存放与/etc/issue文件中;
  • 若是通过远程本文设备(如通过ssh或telnet等)登录,则该信息存放与/etc/issue.net文件中。

1. 第一映像:

unimous@unimous-f41:~$ cat /etc/issue
Ubuntu 11.10 \n \l unimous@unimous-f41:~$ cat /etc/issue.net
Ubuntu 11.10

2. \n \l 是什么?

在/etc/issue文件中,允许使用转义序列(escape sequence),当系统遇到escape sequence的时候会自动替换成相应的信息,比如:\n代表主机名。完整的转移序列列表如下(此列表摘自:man agetty,因为此issue由agetty负责解释):

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 number of current users logged in.
v Insert the version of the OS, eg. the build-date etc.

3. 关于issue.net的说明:

首先,issue.net中不能存在escape sequence;

其次,使用ssh登录时,会不会显示issue信息由ssh的配置决定。

/etc/issue 与 /etc/issue.net 文件,telnet登陆前的显示的更多相关文章

  1. Linux的/etc/issue、/etc/issue.net和/etc/motd的区别

    Linux使用这三个文件/etc/issue./etc/issue.net和/etc/motd 来控制本地及远程登录前后的信息显示,网上很多相互转载,说的都不清楚,自己实际测试了一下,结果记录如下: ...

  2. Linux /etc/issue 和 /etc/issue.net的作用和区别

    1./etc/motd /etc/motd即messageoftoday(布告栏信息),每次用户登录时,/etc/motd文件的内容会显示在用户的终端.系统管理员可以在文件中编辑系统活动消息,例如:管 ...

  3. windows下使用远程工具登录虚拟机上的Linux、访问虚拟机上的服务 、端口转发、win7 telnet登陆虚拟机

    首先要清楚virtual box如何设置端口转发: 一篇文章: 如何使用VirtualBox进行端口转发 由于默认的方式是用NAT来做虚拟机网络的,因此如果从外网想访问虚拟机的应用会比较麻烦.以前一直 ...

  4. windows10系统telnet登陆

    参考网站:https://jingyan.baidu.com/article/acf728fd498e9ff8e510a322.html windows10系统以及没有telnet服务器端了. 需要单 ...

  5. jQueryMobile引入文件后样式无法正常显示

    jQueryMobile引入文件后样式无法正常显示解决方法: jQuery文件必须放在jQueryMobile文件之前 eg:

  6. Java的实验程序之输出单个文件中的前 N 个最常出现的英语单词

    日期:2018.10.11 星期四 博客期:016 题目:输出单个文件中的前 N 个最常出现的英语单词,并输出到文本文件中 在程序运行之前,我试着先写了字符的字母的总结,加载代码如下: //如下是第一 ...

  7. VB高效导入Excel2003和Excel2007文件到MSHFlexGrid控件显示

    1.VB高效导入Excel2003和Excel2007文件到MSHFlexGrid控件显示 2.以前也有Excel导入通用功能,但速度有些慢一会把两种实现方式都提供出为参考对比. 一.原通用导入exc ...

  8. eclipse_neon 的Spket 目录下只有一个Task Tags,没有其他的选项,导致没有办法添加提示文件! 添加sdk文件之后还是没有办法显示的解决办法

    问题解决办法: 将 spket-1.6.23的安装包里面的features  plugins 单独复制到D:\eclipse_neon\dropins 目录下,重启一下eclipse即可正常显示! 添 ...

  9. memcached空指针内存错误与死循环问题分析(memcached dead loop and crash bug! issue #260 and issue #370)

    (由于这是发在memcached邮件列表的,所以只能用一下蹩脚的英文了) (you should read the discuss about issue #260 first:  https://g ...

随机推荐

  1. 驱动之DMA的介绍与应用20170210

    本文主要介绍的是DMA相关的知识,首先: 1)在实现DMA传输时,是由DMA控制器直接掌管总线,因此,存在着一个总线控制权转移问题.即DMA传输前,CPU要把 总线控制权交给DMA控制器,而在结束DM ...

  2. Centos 下 error while loading shared libraries: libopencv_core.so.3.0

    error while loading shared libraries: libopencv_core.so.3.0 Check if those libraries are present in ...

  3. Centos7.3 安装 OpenCV3.3.0

    一开始会出现这个错误: CMake Error at CMakeLists.txt: (message): FATAL: In-source builds are not allowed. You s ...

  4. 省选模拟赛 LYK loves rabbits(rabbits)

    题目描述 LYK喜欢兔子,它在家中养了3只兔子. 有一天,兔子不堪寂寞玩起了游戏,3只兔子排成一排,分别站在a,b,c这3个位置. 游戏的规则是这样的,重复以下步骤k次:选择两个不同的兔子A和B,假如 ...

  5. python的StringIO模块

    StringIO经常被用来作字符串的缓存,因为StringIO的一些接口和文件操作是一致的,也就是说同样的代码,可以同时当成文件操作或者StringIO操作. 一.StringIO中的常用方法 1.r ...

  6. 用js实现千位分隔符

    function mm(num) { return num && num .toString() .replace(/(\d)(?=(\d{3})+\.)/g, function($0 ...

  7. css之display:inline-block布局--转

    css之使用display:inline-block来布局   css之display:inline-block布局 1.解释一下display的几个常用的属性值,inline , block, in ...

  8. 百度搜索URL中的参数都是什么

    最近,点石排名更新了一个新功能——站内搜索.其实理解起来也很简单,就是通过URL限定搜索结果为某个网站,从而参与点击(例如:https://www.baidu.com/s?wd=SEO&si= ...

  9. 常用的20个强大的 Sublime Text 插件

    作为一个开发者你不可能没听说过 Sublime Text.不过你没听说过也没关系,下面让你明白. Sublime Text是一款非常精巧的文本编辑器,适合编写代码.做笔记.写文章.它用户界面十分整洁, ...

  10. Paramiko使用

    1.下载安装 pycrypto-2.6.1.tar.gz (apt-get install python-dev) 解压,进入,python setup.py build[编译],python set ...