Serverspace Black Friday
WB
William Bell
May 21, 2020
Updated June 7, 2023

Installing the GNOME GUI on CentOS 7

CentOS

Using another OS?

Select the desired version or distribution.

GNOME is part of the GNU project and is a desktop graphical interface (GUI). It uses the KISS (Keep it simple, stupid) principle and is the standard GUI for many distributions such as Debian, Fedora, Red Hat Enterprise Linux, Kali Linux, etc.

In this article, we will explain how to install the GNOME GUI on the base version of the CentOS 7 operating system. Since this system works in command line mode (CLI), as an example we will use a set of commands for the terminal.

Installation

We assume that you have already installed CentOS (if not already, you can rent VPS with this operating system), and you have root or superuser rights. In this case, we will write commands as the root user. If you are not a root user, just put sudo before all commands.

Upgrade your system

First, we update the system. This is not always required, but doing so is good practice:

yum update

We are waiting for the installation of updates to complete and move on to the next step.

Install GNOME packages

Now we install the GNOME packages. To install them, we will use a command that installs all packages related to the GNOME GUI:

sudo yum -y groups install "GNOME Desktop"

Configure the X Window System

The program that runs the graphical environment on most Linux systems is called the X Window System. So, firstly, you must tell the X Window System that GNOME is the default GUI. To enter this command:

echo "exec gnome-session" >> ~/.xinitrc

Now we have finished installing GNOME and configuring the X Window System. Let's verify this by entering the command:

startx

After running this command, you will see the GNOME GUI, similar to the image below, which means that it works:

GNOME GUI
Screenshot №1. GNOME GUI

Now the GNOME GUI is installed and tested. However, to start it, you must enter the command startx every time you start the operating system, which is not very convenient. Let's make it start automatically. To do this, use the following command:

systemctl set-default graphical.target

Vote:
4 out of 5
Аverage rating : 4
Rated by: 6
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.