设置Linux(Centos6、Centos7)不启动图形界面(startx命令可启动图形界面) | 您所在的位置:网站首页 › centos7开机无法进入图形界面 › 设置Linux(Centos6、Centos7)不启动图形界面(startx命令可启动图形界面) |
1、针对Centos6版本,打开配置文件/etc/inittab
[root@localhost ~]# vi /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
修改 id:5:initdefault: 为 id:3:initdefault:,保存退出。 【说明】: 新版本的CentOS 系统里使用’targets’ 取代了运行级别的概念。系统有两种默认的’targets’: 多用户.target 对应之前版本的3 运行级别; 而图形.target 对应之前的5运行级别。 第1种:查看默认的target,执行: systemctl get-default 第2种:开机以命令模式启动,执行: systemctl set-default multi-user.target 第3种:开机以图形界面启动,执行: systemctl set-default graphical.target 【具体方法】:直接在命令窗口执行以下命令打开命令行模式启动(如下图): [root@localhost ~]# systemctl set-default multi-user.target可参考如下图: ![]() |
今日新闻 |
推荐新闻 |
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 |