Installing GUI on CentOS 7/8 and RHEL 7/8

If you are running a CentOS 7/8 or RHEL7/8 in your environment with minimal installation and for want to install a graphical desktop for some reason, it is a very easy process. Thanks to the yum grouplist and the yum groupinstall commands, which are very powerful commands that save you precious time by installing group of packages easily without the need to install packages individually.

By using yum groups, it’s not necessary to manually install related packages one by one, and we will use this feature to install the GUI desktop environment in my CentOS 8 server running with minimal installation.

The current systemctl target in my running system is, which is the equivalent of runlevel 3, Text mode in systemd. We can check this with below command

The two most common targets are:

  • analogous to runlevel 3, Text mode
  • analogous to runlevel 5, GUI mode with X server

After the GUI desktop is installed, we will need to change the default to to allow the system to boot by default on the graphical target. We will see how to do this later in this post.

First, list all available package groups with the yum grouplist command

As you can see from below output, the current installed environment group is “Minimal Install” and one of the available groups to install is “Server with GUI“. We can dig further by displaying the subgroups that will be installed with a specific group, we can use the yum groupinfo “Group Name” command.

For example, to list the available packages grouped in the “Server with GUI”, use below command.

The above output shows the mandatory groups and the optional groups to be installed. One of the mandatory groups listed is GNOME, so we can assume that the GNOME desktop will be installed while installing the “Server with GUI” group, along with other administration tools like “Internet Browser”, “Multimedia”, …etc.

Let’s go ahead and install the “Server with GUI” group with yum groupinstall command. Below command will install all other mandatory groups listed above. If you wish to install only the GNOME environment, type “GNOME” instead of “Server with GUI”


Once the installation is completed, change the default system target to to make the system boot on GUI interface by default, then reboot the system.

After the system is rebooted, go through the GNOME initial configuration wizard and you’re good to go with you CentOS 8 Graphical installation.

CentOS 8 with GNOME is ready to be used!

If you would like to revert back the system to boot to the text mode as the default target, use below command.

To uninstall the GUI desktop from your system, use the yum groupremove command to uninstall GNOME then reboot your system.

That’s it for this post. Thanks for reading!

Find this post interesting. Share it!

Leave a Comment

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