List of content you will read in this article:
The term GUI stands for Graphical User Interface. It provides a visual environment that makes it convenient to use CentOS. Without a GUI, there are only command lines to interact with. While some hardcore coders might feel okay with the default interface of CentOS, other users prefer a more visually appealing environment; hence, they install GUI on CentOS.
GUI makes it possible to interact with the operating system using windows, icons, menus, and a cursor rather than just command lines. As we’ll show you in this article, installing a GUI on CentOS is not a complicated task and can be done in a matter of minutes. There are three popular types of GUIs, and we will instruct you on how to install each of them on your CentOS.
Installing GNOME on CentOS
GNOME is an open-source GUI that has been around for quite some time, being compatible with various platforms such as Linux, FreeBSD, CentOS, etc. It is an efficient graphical user interface that makes it easy to use CentOS without consuming much resource.
Here is a step by step guide on how to install GNOME on CentOS:
Step 1: To install any kind of GUI, it is necessary to update the packages on CentOS. To do that, simply run this command in the CentOS command line:
sudo yum update
If you are wondering what Yum is, it is CentOS’s native package manager.
Step 2: After updating the packages, now it is time to download and install GNOME as your GUI on CentOS. Run this command to start the installation process:
sudo yum -y groups install "GNOME Desktop"
It will take some time to download GNOME and install it. GNOME is nearly 1 gigabyte, and depending on your network speed, the waiting time could be somewhere around less than an hour.
Step 3: When the download and installation process comes to an end, you will be back to the default command line screen as if nothing has happened. But don’t worry, because the GUI will not run by itself and that’s why you are back to the command line screen. To run the GUI and make sure that the installation has been successful, run this command:
echo "exec gnome-session" >> ~/.xinitrc
With this command, GNOME will be assigned as the desktop environment to be run on CentOS.
Step 4: Now it is time to run GNOME on CentOS and experience the new GUI environment. All you have to do is run this simple command:
startx
Step 5: With this command, you will be greeted with your new GUI, which in this case is GNOME. But it is not your default screen yet. That means every time you reboot your server, you will be back to the default command line environment and have to run the “startx” command to restart GNOME. The good news is that you can fix it if you want. Open your terminal on CentOS. One way to do that is to use CTRL + ALT + T. Now type down this command:
systemctl set-default graphical.target
From now on, every time that you reboot the server, you will be back on the GNOME login screen. In other words, there is no need to run commands to launch your GUI.
Installing KDE Plasma on CentOS
It’s the same process as GNOME but with some minor changes to the codes. Here is how to do it:
Step 1: Updating packages:
sudo yum update
Step 2: Downloading and installing KDE Plasma:
sudo yum -y groups install "KDE Plasma Workspaces"
Step 3: Introduce the new GUI to the X Window System:
echo "exec startkde" >> ~/.xinitrc
Step 4: Run KDE Plasma:
startx
Step 5: Set KDE Plasma as the default GUI on CentOS:
systemctl set-default graphical.target
Installing MATE on CentOS
The third GUI option on CentOS is MATE. Again, it is the same process as GNOME and KDE Plasma installation with some tiny changes to the codes:
Step 1: Updating packages:
sudo yum update
Step 2: Downloading and installing MATE:
sudo yum --enablerepo=epel -y groups install "MATE Desktop"
Step 3: Introduce the new GUI to the X Window System:
echo "exec /usr/bin/mate-session" >> ~/.xinitrc
Step 4: Run MATE:
startx
Step 5: Set MATE as the default GUI on CentOS:
systemctl set-default graphical.target
Conclusion
That’s it, with these easy steps you can install GUI on CentOS. Try each of these three different GUIs and see which one will suit you better.
Hello, everyone, my name is Lisa. I'm a passionate electrical engineering student with a keen interest in technology. I'm fascinated by the intersection of engineering principles and technological advancements, and I'm eager to contribute to the field by applying my knowledge and skills to solve real-world problems.