Enable/Disable GUI from Server Install
Table of Contents
Date: 11-11-2015
CENTOS 6 OR OLDER
- Edit inittab
sudo vi /etc/inittab
- Add/Change "5" to "3" in the following line at end:
id:5:initdefault:
becomes:
id:3:initdefault:
- Reboot
- Log in with text mode
NOTE: The system will just operate purely in CLI mode. If you should ever want to temporally use a GUI you can invoke one with a startx command. NOTE: 5 = Runlevel 5, 3 = Runlevel 3
CENTOS 7
From terminal enter the following to turn GUI off:
systemctl set-default multi-user.target
multi-user.target = runlevel 3
or ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
From terminal enter the following to turn GUI on:
systemctl set-default graphical.target
graphical.target = runlevel 5
or ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target