服务器之家:专注于服务器技术及软件下载分享
分类导航

Linux|Centos|Ubuntu|系统进程|Fedora|注册表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服务器之家 - 服务器系统 - Centos - CentOS 7.1开机运行模式run level详解

CentOS 7.1开机运行模式run level详解

2019-06-12 11:12CentOS之家服务器之家 Centos

在大多数的linux发行版本中,通常有8个 runlevel;今天小编为大家带来的是CentOS 7.1开机运行模式run level详解,希望对大家会有帮助,有需要的朋友一起去看看吧

在大多数的linux发行版本中,通常有8个 runlevel

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

可以在文件 /etc/inittab 中查看

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

-bash: cat/etc/inittab: 没有那个文件或目录

[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 ~]# 

延伸 · 阅读

精彩推荐