By default a full installation of CentOS 7 will have the graphical user interface (GUI) installed and it will load up at boot, however it is possible that the system has been configured to not boot into the GUI.
In this quick guide we will show you how to swap to the GUI and enable it to start up by default on system boot.
Start GUI In CentOS
In this example I have installed CentOS 7 but we are not currently using the GUI. With the systemctl command, we can list the default target that the system is configured to boot into.
[root@centos7 ~]# systemctl get-default multi-user.target
The multi-user.target is similar to the well known run level 3, which is essentially console only with networking enabled.
We can start the GUI right now (as long as there is a GUI installed) by running ‘systemctl isolate graphical.target’.
[root@centos7 ~]# systemctl isolate graphical.target
While this will start the graphical user interface by moving us into the graphical target (similar to run level 5), if we perform a reboot we will not be presented with the GUI. To do this, we must first set the graphical target to become the default.
[root@centos7 ~]# systemctl set-default graphical.target Removed symlink /etc/systemd/system/default.target. Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
Now if we reboot the system we will automatically boot into the GUI, which ever version you may have installed. If you’re interested in changing things up, check out our posts on installing different GUIs in CentOS.