歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

Redhat 7修改默認運行級別方法 --RHEL7使用systemd創建符號鏈接指向默認運行級別

今天裝了下正式版的RHEL7,發現熟悉的inittab中沒有了修改默認運行級別,打開inittab如下

[root@localhost init.d]# vi /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 /etc/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 set a default target, run:
#
# ln -sf /lib/systemd/system/<target name>.target /etc/systemd/system/default.target

中間沒有了熟悉的 id:5:initdefault

 

RHEL7 使用systemd創建符號鏈接指向默認運行級別。

 

修改方法為:
1.首先刪除已經存在的符號鏈接
----------------------------------------------------------------------------------
rm /etc/systemd/system/default.target
----------------------------------------------------------------------------------
2.默認級別轉換為3(文本模式)
----------------------------------------------------------------------------------
ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
----------------------------------------------------------------------------------
或者默認級別轉換為5(圖形模式)
----------------------------------------------------------------------------------
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
----------------------------------------------------------------------------------
3.重啟
----------------------------------------------------------------------------------
reboot
----------------------------------------------------------------------------------

Red Hat Enterprise Linux 7 現已提供用戶下載 http://www.linuxidc.com/Linux/2014-06/102998.htm

RHEL 6.3 安裝教程圖文詳解 http://www.linuxidc.com/Linux/2014-05/101845.htm

Red Hat Linux 7.0 安裝圖解 http://www.linuxidc.com/Linux/2014-06/103190.htm

更多RedHat相關信息見RedHat 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=10

Copyright © Linux教程網 All Rights Reserved