码迷,mamicode.com
首页 > 系统相关 > 详细

Linux的运行级别

时间:2015-08-11 23:45:03      阅读:1256      评论:0      收藏:0      [点我收藏+]

标签:linux 运行级别

一.Linux的运行级别

    1.查看当前运行级别的命令:runlevel

    2.每个运行级别的作用


二.各运行级别下的含义

    1.init 0(关机)

    # ls /etc/rc.d/rc0.d

    K05wdaemon             K60crond               K84NetworkManager        K90network

    K10saslauthd             K73winbind            K84wpa_supplicant           K92ip6tables

    K15svnserve              K74haldaemon       K85mdmonitor                  K92iptables

    K25sshd                     K74ntpd                  K85messagebus                K95firstboot

    K30postfix                 K75netfs                 K87restorecond                 S00killall

    K30spice-vdagentd   K75ntpdate            K88auditd                          S01halt

    K50dnsmasq              K75udev-post        K88rsyslog

    K50netconsole           K80kdump             K89rdisc

 

    这个级别启动的只有killall和hatl服务,杀死全部进程和关机,这个级别只用作关机


    2.init 1(单用户模式)

    # ls /etc/rc.d/rc1.d

    K05wdaemon             K60crond                             K84wpa_supplicant          K92ip6tables

    K10saslauthd              K73winbind                         K85mdmonitor                 K92iptables

    K15svnserve               K74haldaemon                    K85messagebus                K95firstboot

    K25sshd                      K74ntpd                              K87restorecond                 S26udev-post

    K30postfix                   K75netfs                             K88auditd                          S99single

    K30spice-vdagentd     K75ntpdate                        K88rsyslog

    K50dnsmasq                K80kdump                         K89rdisc

    K50netconsole            K84NetworkManager        K90network

    

    这个级别启动的服务同样只有两个,udev相关和single(单用户模式)。只支持root单用户,不支持其     他用户使用


    3.init 2(多用户模式-无fns)

    # ls /etc/rc.d/rc2.d

    K05wdaemon              K74ntpd                    S08ip6tables               S26udev-post

    K10saslauthd               K75netfs                   S08iptables                 S55sshd

    K15svnserve                 K75ntpdate              S10network                S80postfix

    K30spice-vdagentd      K80kdump               S11auditd                   S90crond

    K50dnsmasq                K84wpa_supplicant  S12rsyslog                  S99local

    K50netconsole             K87restorecond       S15mdmonitor

    K73winbind                  K89rdisc                   S22messagebus

    K74haldaemon             K95firstboot            S23NetworkManager

    

    这个级别启动服务很多, 基本上需要的都有,但是nfs相关服务没有开启,这个级别不支持nfs


    4.init 3(多用户模式)

    # ls /etc/rc.d/rc3.d

    K05wdaemon             K75ntpdate                 S11auditd              S26udev-post

    K10saslauthd              K84wpa_supplicant     S12rsyslog             S55sshd

    K15svnserve                K87restorecond          S15mdmonitor      S80postfix

    K30spice-vdagentd     K89rdisc                      S20kdump             S90crond

    K50dnsmasq               K95firstboot                S22messagebus     S99local

    K50netconsole            S08ip6tables               S23NetworkManager

    K73winbind                 S08iptables                 S25netfs

    K74ntpd                      S10network                 S26haldaemon


    服务基本开启,nfs服务也有了,我们平时运行虚拟机默认的启动级别也是这个级别


    5.init 4(保留级别)

    # ls /etc/rc.d/rc4.d

    K05wdaemon             K75ntpdate                 S11auditd                  S26udev-post

    K10saslauthd              K84wpa_supplicant     S12rsyslog                S55sshd

    K15svnserve                K87restorecond          S15mdmonitor         S80postfix

    K30spice-vdagentd     K89rdisc                      S20kdump                S90crond

    K50dnsmasq               K95firstboot                S22messagebus        S99local

    K50netconsole            S08ip6tables               S23NetworkManager

    K73winbind                 S08iptables                 S25netfs

    K74ntpd                      S10network                 S26haldaemon


    开启的服务和init3是一样一样滴,所以这只是作为一个保留的级别(并不是安全模式!)


    6.init 5(图形界面)

    # ls /etc/rc.d/rc5.d

    K05wdaemon         K84wpa_supplicant          S12rsyslog                     S55sshd

    K10saslauthd          K87restorecond               S15mdmonitor              S70spice-vdagentd

    K15svnserve           K89rdisc                           S20kdump                     S80postfix

    K50dnsmasq          K95firstboot                     S22messagebus             S90crond

    K50netconsole       S08ip6tables                    S23NetworkManager      S99local

    K73winbind            S08iptables                      S25netfs

    K74ntpd                 S10network                      S26haldaemon

    K75ntpdate            S11auditd                        S26udev-post


    我并没有安装图形界面,所有我也不是很清楚技术分享


    7、init 6(重新启动)

     # ls /etc/rc.d/rc6.d

     K05wdaemon             K60crond              K84NetworkManager      K90network

     K10saslauthd              K73winbind          K84wpa_supplicant          K92ip6tables

     K15svnserve               K74haldaemon     K85mdmonitor                K92iptables

     K25sshd                      K74ntpd               K85messagebus               K95firstboot

     K30postfix                  K75netfs               K87restorecond               S00killall

     K30spice-vdagentd    K75ntpdate          K88auditd                        S01reboot

     K50dnsmasq               K75udev-post      K88rsyslog

     K50netconsole            K80kdump           K89rdisc


     只有一个killall和一个reboot reboot(重新启动)


三.安装图形界面

     1.首先用yum grouplist查看可用的安装软件包;

     2.因为并不支持中文(我不服),所以要转化成英文:LANG=en

     3.安装Desktop和window system;

        yum grouplist -y "X Window System"

        yum grouplist -y "Desktop"

     

     这样图形界面就安装成功,大功告成了技术分享

本文出自 “萨摩耶的忧伤” 博客,转载请与作者联系!

Linux的运行级别

标签:linux 运行级别

原文地址:http://358513922.blog.51cto.com/10589843/1683759

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!