zoukankan      html  css  js  c++  java
  • centos7系统运行级别简介

    centos7系统运行级别简介我们知道,centos6及之前的版本中,系统运行级别通过/etc/inittab文件进行设置和控制,但在centos7中,对这个文件的设置将不会对系统运行级别产生影响,这也是centos7中变化比较大的一部分特性。
    下面,我们就来介绍下系统运行级别方面的内容。

    1. 运行级别对应关系

        init level           systemctl target
        0                        shutdown.target
        1                        emergency.target
        2                        rescure.target
        3                        multi-user.target
        4                        无
        5                        graphical.target
        6                        reboot.target

    2. 运行级别设置

    1)语法:systemctl [command] [unit.target]
    2)命令及参数:

    • command部分

    get-default :获取当前的target;

    set-default :将默认运行级别设置为指定的target;

    isolate :切换至指定的运行级别。

    • unit.target部分:为上面1节部分中给出的运行级别

    3. 常用运行级别相关命令
    1)systemctl

    systemctl get-default:获取当前的运行级别;

    systemctl set-default multi-user.target:将默认运行级别设置为mulit-user;

    systemctl isolate multi-user.target:不重启系统的情况下,将运行级别切换至mulit-user;

    systemctl isolate graphical.target:不重启系统的情况下,将运行级别切换至图形模式。
    2) 其他

    runlvel:返回结果中,第一个数为之前运行级别,后一个数为当前运行级别;

    init 5:将当前运行级别切换至5(图形模式)。
       

  • 相关阅读:
    云计算安全概述
    快照技术
    存储可靠性技术之--备份
    存储可靠性技术之 --RAID
    存储方式
    存储技术
    CentOS安装setup
    CentOS7安装iptables防火墙
    CentOS 7.0下使用yum安装MySQL
    The APR based Apache Tomcat Native library
  • 原文地址:https://www.cnblogs.com/lhdz_bj/p/10084310.html
Copyright © 2011-2022 走看看