How to disable graphic interface in CentOS/RHEL 7?

When the graphic interface is installed, by default, we will enter graphic mode. How can we disable it?

Well, it’s kinda easy as below:

# mv /etc/systemd/system/ /etc/systemd/system/
# ln -sf /lib/systemd/system/ /etc/systemd/system/
# systemctl reboot

The first command creates a backup, and the second command sets command-line mode as default. Then reboot system to take effect.

The way to enable graphic interface is as simple as below:

# ln -sf /etc/systemd/system/ /etc/systemd/system/
Share Button

Leave a comment

Your email address will not be published. Required fields are marked *