centos7不能像centos6那样直接修改/etc/inittab文件来达到目的;
7 [% A' ^2 h* {$ }5 Gcentos仍然只有两种启动模式:0 B, \7 t7 l+ w: J7 ?- x8 P
. k5 D& [" \. _8 A9 |multi-user.target: analogous to runlevel 3 #命令行模式
1 ?1 m" C$ S/ V, ]2 kgraphical.target: analogous to runlevel 5 #图形模式 [img]file:///C:/Users/Victor/AppData/Roaming/Tencent/Users/1320503165/QQ/WinTemp/RichOle/TPFTNY07I$[JCF%7DNKUYDLNQ.png[/img]
- E/ N4 y$ c# _# I& T
3 a d! c9 @. A% m[img]file:///C:/Users/Victor/AppData/Roaming/Tencent/Users/1320503165/QQ/WinTemp/RichOle/TPFTNY07I$[JCF%7DNKUYDLNQ.png[/img]
9 f0 l7 [4 ]1 `4 r1 V. O* N" L, f8 S d5 Z. F$ \1 \( |
通过systemctl get-default 命令获取当前模式: # x- o) V0 }7 {' c
. ~. ^/ e0 u# p |由上面结果可知,当前为命令行模式 通过systemctl set-default graphical.target 命令,修改启动模式 前提是:你安装了图形界面
1 ?; I0 N2 S6 b7 s6 z |