• Linux运行级别


    Debian和Redhat两种系列的操作系统对运行级别的定义是不同的,下面我们说一下Debian系列操作系统的运行级别(Ubuntu就是Debian系列操作系统),

    可以看到2~5四个运行级别是没有任何区别的,都是多用户模式。Ubuntu的默认运行级级别是2,用runlevel这个命令查看OS当前运行级别。

    在不同的运行级别下,开机会启动不同的服务,需要启动的服务放在/etc/rcx.d下,如在运行级别2下,开机时,会自动启动/etc/rc2.d目录下的以S开头

    的服务,而以K开头的服务是开机时不启动的。如下,我将nginx设置开机时不启动,当然,如果你想设置服务开机时启动或不启动,要用

    sudo sysv-rc-conf <service_name> <on/off>

    zhj@test:/etc/rc2.d$ ls
    K20nginx  S20kerneloops  S20rabbitmq-server  S20speech-dispatcher  S23ntp    S70dns-clean  S99grub-common  S99rc.local
    README    S19mysql       S20rsync            S20xrdp               S50saned  S70pppd-dns   S99ondemand
    zhj@test:/etc/rc2.d$

     

    运行级别

    级别说明

    0

    Halt,关机模式

    1

    Single,单用户模式

    2

    Full multi-user with display manager (GUI)

    3

    Full multi-user with display manager (GUI)

    4

    Full multi-user with display manager (GUI)

    5

    Full multi-user with display manager (GUI)

    6

    Reboot,重启模式

  • 相关阅读:
    js 去掉文本域中的空格
    网站开发步骤
    获取客户端、服务器、本地IP地址
    c#用反射原理递归遍历复杂实体对象
    jquery1.8在ie8下not无效?
    状态模式
    虚函数和抽象函数的区别
    HashTable、HashSet和Dictionary的区别
    sql视图学习笔记--视图
    html背景为灰色 不能操作,中间div可以操作
  • 原文地址:https://www.cnblogs.com/ajianbeyourself/p/4189023.html
Copyright © 2020-2023  润新知