在centos6中有initctl 可以启动tty等。此命令在 upstart-0.6.5-10.el6.x86_64 rpm包中

或者 mingetty 命令启动 tty

#initctl start tty TTY=/dev/tty6

在centos7已经没有此命名及相应的rpm包。

应该是通过 agetty命令启动tty,  util-linux-2.23.2-26.el7.x86_64

agetty    alternative Linux getty, agetty opens a tty port, prompts for a login name and invokes the /bin/login command. It is normally invoked by

init(8).

    启动  #agettty tty2

centos 7 下使用systemd-getty-generator 生成更多的tty

  systemd-getty-generator — Generator for enabling getty instances on the console

file: /usr/lib/systemd/system-generators/systemd-getty-generator

centos 7 下tty相关的systemd 服务

  console-getty.service     disabled
  container-getty@.service    static
  getty@.service         enabled
  serial-getty@.service      disabled
  getty.target           static

利用 systemctl mask 屏蔽服务

for i in {4..6}; do
systemctl mask getty@tty${i}.service
done

修改 /etc/systemd/logind.conf 文件中

#NAutoVTs=6

  #ReserveVT=6

可以屏蔽屏蔽掉后面的,如设置为1 和 0. 但我们使用的是tty2. tty1无法屏蔽掉

   

待学习:

1. 此命令的功能;

2. 此rpm中其他命令的功能

3. 在centos7中的相应功能

4. 如何修改centos控制台上的标题

5. 修改/etc/systemd/logind.conf 中 NAutoVTs=0, ReserveVT=0 都能看到前两个tty

centos 6 initctl的更多相关文章

  1. Linux学习之CentOS(二十一)--Linux系统启动详解

      在这篇随笔里面将对Linux系统的启动进行一个详细的解释!我的实验机器是CentOS6.4,当然对于现有的Linux发行版本,其系统的启动基本上都是一样的! 首先我们来看下Linux系统启动的几个 ...

  2. Linux学习之CentOS(二十二)--单用户模式下修改Root用户的密码

    在上一篇随笔里面详细讲解了Linux系统的启动过程 (Linux学习之CentOS(二十一)--Linux系统启动详解),我们知道Linux系统的启动级别一共有6种级别,通过 /etc/inittab ...

  3. Docker 从零开始制作基础镜像[centos]

    http://www.oschina.net/news/62897/docker-hub-contains-high-risk-vulnerabilities 这里有个统计,docker官方和个人发布 ...

  4. CentOS 7 运行级别切换

    CentOS 7 之前的版本是通过 /etc/inittab 文件来定义系统运行级别: [sywu@wusuyuan ~]$ cat /etc/centos-release CentOS releas ...

  5. CentOS 简单命令

    一.启动级别 Linux系统设置系统启动模式的方式可以修改(必须要以root身份登录才能修改).修改系统启动模式的配置文件是   /etc/inittab. 我们在切换到root用户后,然后 vi / ...

  6. 简介CentOS与 Ubuntu的不同

    1.关于登录用户 centos可以使用root登录  ubuntu不能使用root登录 centos普通用户默认不能通过sudo取得root权限执行命令, ubuntu可以,centos需要sudo时 ...

  7. CentOS的启动流程

    因6和7俩个系列的启动流程有区别,所以我把他们分开来写 linux可看作是内核和根文件系统组成我们把内核单独拿出来总结一下 CentOS6系列启动流程 首先总结一下总体的流程,接下来展开来叙述:POS ...

  8. 【转】【Centos】Centos下用upstart管理自己的服务程序

    Upstart是Ubuntu用来进行服务进程管理的服务,本文介绍如何利用upstart来通过Centos操作系统管理我们自己开发的应用程序. 什么时候要管理我们的应用程序?当我们开发出服务类的应用程序 ...

  9. centos Linux系统日常管理1 cpuinfo cpu核数 命令 w, vmstat, uptime ,top ,kill ,ps ,free,netstat ,sar, ulimit ,lsof ,pidof 第十四节课

    centos Linux系统日常管理1  cpuinfo cpu核数   命令 w, vmstat, uptime ,top ,kill ,ps ,free,netstat ,sar, ulimit ...

随机推荐

  1. hibernate内部测试题(附赠答案)

    一.选择题(共25题,每题2.5分,选择一项或多项,漏选错选不得分) 1.在Hibernate中,以下关于主键生成器说法错误的是( ). A.increment可以用于类型为long.short或by ...

  2. __attribute__ 你知多少?

    GNU C 的一大特色就是__attribute__ 机制.__attribute__ 可以设置函数属性(Function Attribute ).变量属性(Variable Attribute )和 ...

  3. hadoop删除节点。

    hadoop节点摘除操作: 1.确定exclude文件的位置. <property> <name>dfs.hosts.exclude</name> <valu ...

  4. 循环神经网络(RNN, Recurrent Neural Networks)介绍(转载)

    循环神经网络(RNN, Recurrent Neural Networks)介绍    这篇文章很多内容是参考:http://www.wildml.com/2015/09/recurrent-neur ...

  5. PHP Date Function Base

    /**************格式中可使用字母的含义**************/a – "am" 或是 "pm"  A – "AM" 或是 ...

  6. noip2013 火柴排序

    涵涵有两盒火柴,每盒装有 n 根火柴,每根火柴都有一个高度.现在将每盒中的火柴各自排成一列,同一列火柴的高度互不相同,两列火柴之间的距离定义为: ,其中 ai 表示第一列火柴中第 i 个火柴的高度,b ...

  7. django1.9.6 使用 DjangoUeditor (python3.5)

    DjangoUeditor https://github.com/zhangfisher/DjangoUeditor 1 DjangoUeditor 安装 pip install DjangoUedi ...

  8. There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework

    Fixing the "There is already an open DataReader associated with this Command which must be clos ...

  9. Apache Shiro简介

    作者:var dump链接:https://zhuanlan.zhihu.com/p/23300328最近要做一个基于Java C/S架构的项目,主要涉及权限管理这方面的东西.了解到Apache Sh ...

  10. javascript中的闭包解析

    学习javaScript已经有一段时间了,在这段时间里,已经感受到了JavaScript的种种魅力,这是一门神奇的语言,同时也是一门正在逐步完善的语言,相信在大家的逐步修改中,这门语言会逐步的完善下去 ...