在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. USACO 08-Nov( 最小生成树)

    美国人出题拐弯抹角,倒是挺尊重动物的 10206301 2 52 3 52 4 123 4 172 5 153 5 64 5 12 Hint从牧场4起床, 然后按照 4, 5, 4, 2, 3, 2, ...

  2. UVA 12661(动态权值+最短路,dij)

    题意:赛车背景,给你n个节点,m条边的图以及起点和终点:其中每条边的信息包括u(起点),v(终点),a(开启的时间),b(关闭的时间),d(通过这条道路的时间):求最短通过的时间,其中车在进的时候,保 ...

  3. in_array 查询数组中是否存在某个值

    (PHP 4, PHP 5) in_array — 检查数组中是否存在某个值 说明 bool in_array ( mixed $needle , array $haystack [, bool $s ...

  4. CentOS 7 为firewalld添加开放端口及相关资料

    1.运行.停止.禁用firewalld 启动:# systemctl start  firewalld 查看状态:# systemctl status firewalld 或者 firewall-cm ...

  5. Android:给ViewPager添加切换效果

    原文参照开发者官网:http://developer.android.com/training/animation/screen-slide.html#viewpager 以App的引导页为例: 首先 ...

  6. 快速理解Java中的五种单例模式

    解法一:只适合单线程环境(不好) package test; /** * @author xiaoping * */ public class Singleton { private static S ...

  7. java——XML与java对象装换

    -------------------------------Dog类--------------- publicclass Dog implements Serializable{ privates ...

  8. Windows 10 x64 安装 Visual Basic 6.0 SP6

    原文是E文,E文好的可以直接看这里:http://www.fortypoundhead.com/showcontent.asp?artid=23993 原则上Windows 7 x64, Window ...

  9. urllib2.open(req).read() 报403的错误:怎么办?

    http://www.douban.com/group/topic/18095751/ heads = {'Accept':'text/html,application/xhtml+xml,appli ...

  10. MongoDB快速上手

    1.  MongoDB简介 MongoDB是一个跨平台的基于Key_Value键值对形式保存数据的NoSQL文档类型数据库. NoSQL(not only sql)数据库,泛指非关系型数据库. 1.1 ...