CentOS startup level: init 0, 1, 2, 3, 4, 5, 6

Source: Internet
Author: User

CentOS startup level: init 0, 1, 2, 3, 4, 5, 6

This is a long-time knowledge point, but I have been confused all the time. Today I am trying to understand it ..

0: stopped

1: Maintenance by root only

2: multiple users, cannot use net file system

3: more users

5: Graphical

4: Security Mode

6: restart

In fact, you can view the rc *. d file in/etc/rc. d/to compare and understand ..

Init 0, the corresponding system will run, the program specified in/etc/rc. d/rc0.d. Let's take a look at the name.

[Root @ localhost ~] # Ls/etc/rc. d/rc0.d

Bytes

Bytes

K10saslauthdK20nfsK36mysqldK69rpcsvcgssdK75udev-postK84wpa_supplicantK86nfslockK89iscsidK92iptables

Bytes

K15gpmK30sendmailK50netconsoleK74acpidK83bluetoothK85messagebusK87rpcbindK89rdiscK99lvm2-monitor

According to the preceding red font, killall and halt processes are the two processes that can be executed. Therefore, init 0 is used to indicate shutdown.

Init 1, the corresponding system will run, the program specified in/etc/rc. d/rc1.d.

[Root @ localhost ~] # Ls/etc/rc. d/rc1.d

Bytes

Bytes

Bytes

K10xfsK25sshdK50haldaemonK70vboxdrvK83bluetoothK85messagebusK87rpcbindK89rdiscS02lvm2-monitor

K15gpmK30sendmailK50netconsoleK74acpidK83portreserveK85rpcgssdK88iscsiK90networkS26udev-post

There are three services started at this level: udev, lvm, and single (single-user mode ). Therefore, the single-user mode is available only for root users, and other users are not supported.

Init 2, the corresponding system will run, the program specified in/etc/rc. d/rc2.d.

[Root @ localhost ~ ] # Ls/etc/rc. d/rc2.d/

Bytes

Bytes

K10xfsK30sendmailK50netconsoleK76openvpnK86nfslockK90networkS13rpcbindS25cupsS85gpm

K15ksmtunedK35nmbK66gpsdK83bluetoothK88iscsiS02lvm2-monitorS15mdmonitorS26acpidS90crond

K16ksmK35smbK69rpcsvcgssdK84wpa_supplicantK89iscsidS08ip6tablesS22messagebusS26udev-postS99alsasound

Many services are started at this level. NetworkManager, iptables, acpid, and alsa are all enabled, but nfs, smb, and openvpn services are not enabled. nfs is not supported at this level.

Init 3, corresponding system run/etc/rc. d/rc3.d

[Root @ localhost ~] # Ls/etc/rc. d/rc3.d/

Bytes

Bytes

K10xfsK50netconsoleK84wpa_supplicantK99lvm2-monitorS13iscsiS22messagebusS26acpidS50haldaemonS91nmb

K20nfsK66gpsdK85mdmonitorS07iscsidS13rpcbindS23NetworkManagerS26udev-postS84ksmS91smb

Bytes

This nfs service is enabled and becomes a full multi-user mode.

Init 4

[Root @ localhost ~ ] # Ls/etc/rc. d/rc4.d/

K01dnsmasqK30sendmailK66gpsdK85mdmonitorS07iscsidS13rpcbindS23NetworkManagerS26udev-postS84ksmS99local

Bytes

Bytes

K20nfsk36mysqldk76openvpnk90networks12rsyslogs19rpcgssds25netfss50417ths90crond

K25sshdK50netconsoleK84wpa_supplicantK99lvm2-monitorS13iscsiS22messagebusS26acpidS50haldaemonS99alsasound

This mode is called security mode.

Init 5

[Root @ localhost ~ ] # Ls/etc/rc. d/rc5.d/

K01dnsmasqK25sshdK66gpsdK84wpa_supplicantK87rpcbindK90networkS22messagebusS26udev-postS84ksmS99local

K10saslauthdK30sendmailK69rpcsvcgssdK85mdmonitorK88iscsiK99lvm2-monitorS23NetworkManagerS30vboxdrvS85ksmtuned

Bytes

K15gpmk50netconsolek76openvpnk85rpcidmapdk89netplugds08iptabless25netfss50417ths91smb

Bytes

Complete graphic mode

Init 6

[Root @ localhost ~ ] # Ls/etc/rc. d/rc6.d/

Bytes

Bytes

K10saslauthdK20nfsK36mysqldK69rpcsvcgssdK75udev-postK84wpa_supplicantK86nfslockK89iscsidK92iptables

Bytes

K15gpmK30sendmailK50netconsoleK74acpidK83bluetoothK85messagebusK87rpcbindK89rdiscK99lvm2-monitor

At this level, there are only two services, one being killall and the other being reboot, namely, shutting down the current system and restarting. This level is restart.

Different system versions may have different files. If you want to view the files, you can refer to ll. In fact, they are all soft connections.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.