Home > System Tutorial > LINUX > body text

An in-depth analysis of CentOS 7.1's run levels and boot modes

王林
Release: 2024-01-05 08:36:48
forward
742 people have browsed it

In most linux distributions, there are usually 8 runlevels

Runlevel System State

0 Halt the system

1 Single user mode

2 Basic multi user mode

3 Multi user mode

5 Multi user mode with GUI

6 Reboot the system

S, s Single user mode

Can be viewed in the file /etc/inittab

[root@wode003 ~]# cat/etc/inittab

-bash: cat/etc/inittab: No such file or directory

[root@wode003 ~]# cat /etc/inittab

# inittab is no longer used when using systemd.

## ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.

## Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target

## systemd uses 'targets' instead of runlevels. By default, there are two main targets:

## multi-user.target: analogous to runlevel 3

# graphical.target: analogous to runlevel 5

## To view current default target, run:

# systemctl get-default

## To set a default target, run:

# systemctl set-default TARGET.target

#// get-default

[root@wode003 ~]# systemctl get-default

graphical.target

// set-default

[root@wode003 ~]# systemctl set-default multi-user.target

rm '/etc/systemd/system/default.target'

ln -s '/usr/lib/systemd/system/multi-user.target' '/etc/systemd/system/default.target'

[root@wode003 ~]# systemctl get-default

multi-user.target

[root@wode003 ~]

#

The above is the detailed content of An in-depth analysis of CentOS 7.1's run levels and boot modes. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!