【CentOS 7.1】開機運行模式 run level

來源:互聯網
上載者:User

標籤:centos 7.1 run level initial

在大多數的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 中查看

[[email protected] ~]# cat/etc/inittab 

-bash: cat/etc/inittab: 沒有那個檔案或目錄

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

[[email protected] ~]# systemctl get-default

graphical.target


// set-default

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

[[email protected] ~]# systemctl get-default

multi-user.target

[[email protected] ~]# 





【CentOS 7.1】開機運行模式 run level

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.