zoukankan      html  css  js  c++  java
  • linux 开机启动设置

    运行级别等级:

    • 0        系统停机状态
    • 1        单用户模式,只准许root用户对系统进系维护
    • 2~5  多用户模式(其中3为字符界面、5为图形界面)
    • 6         重启启动

    level2~5是没有任何区别的

    运行级别查看:runlevel  

    切换运行级别:init 3

    init 0表示关机,init 6表示重启。

    执行/etc/rcS.d/目录下的脚本,然后是/etc/rcX.d/目录下的脚本,X代表的是数字0~6。rcS.d和rcX.d目录下的文件都是以,S或K加上两位数字组成的,其中S代表start,K代表kill,而两位数字代表启动顺序,数字越大代表级别越低。

    ls -l /etc/rc3.d/

    lrwxrwxrwx 1 root root 13 Aug 10 03:46 K77ntp -> ../init.d/ntp
    lrwxrwxrwx 1 root root 11 Aug 10 2016 K80w -> ../init.d/w  表示关闭 80最后执行
    lrwxrwxrwx 1 root root 17 Aug 8 04:55 S20hostapd -> ../init.d/hostapd

    ls -l /etc/rcS.d/

    lrwxrwxrwx 1 root root 11 Aug 10 2016 S20w -> ../init.d/w 表示最先启动
    lrwxrwxrwx 1 root root 16 Apr 1 2015 S25brltty -> ../init.d/brltty
    lrwxrwxrwx 1 root root 17 Apr 1 2015 S55urandom -> ../init.d/urandom

    w放在init.d中

    管理工具

    sudo apt-get install sysv-rc-conf  

  • 相关阅读:
    一本通课后练习 / 高手训练
    毒瘤 dp 题做题记录
    埃及分数
    CF340E Iahub and Permutations
    NOI2020 SDOI 爆零记
    Codeforces *1400-1600 做题记录
    Codeforces Round #636 (Div 3) 题解
    Codeforces Round #634 (Div 3) 题解
    洛谷 P4231 三步必杀
    【洛谷】【线段树+位运算】P2574 XOR的艺术
  • 原文地址:https://www.cnblogs.com/ahuo/p/5756191.html
Copyright © 2011-2022 走看看