centos7 默認進入系統命令行模式修改


systemctl get-default  #查看系統啟動進入默認模式

 systemctl set-default graphical.target  #改成默認進入 圖形界面模式

 systemctl set-default multi-user.target  #改成默認進入命令行模式

==================================

[root@localhost ~]# systemctl set-default multi-user.target                      
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.

=====================================

網上各種策略將編輯 inittab文件,從 5--》3即可,centos 7 之后 用系統

graphical.target

"/etc/inittab" 17L, 511C                                                                                                                             17,1         全部
# 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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM