How To Start GUI In CentOS 7 Linux

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.

[[email protected] ~]# 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’.

[[email protected] ~]# 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.

[[email protected] ~]# 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.

Summary

We have seen that we can easily change the current target to the graphical target at run time, and to set the system to boot to the graphical target automatically.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>