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

(编辑:jimmy 日期: 2024/11/16 浏览:2)

在大多数的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 ~]# 

一句话新闻

微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。