
Mastering Linux Administration
By :

The Linux GUI is the desktop environment that allows users to interact with system-level components via windows, icons, menus, or other visual elements. For Linux users who look beyond the CLI, the choice of a Linux distribution may start with the desktop environment. Choosing a desktop environment is ultimately a matter of taste. And for some, the ultimate GUI represents the very extension of their eyes and hands at work.
Among the multitude of Linux desktop environments, there are two that stand out. Let's take a brief look at them.
With its current GNOME 3 (or GNOME Shell) iteration, this GUI platform is one of the most common Linux desktop environments. Nowadays, almost every major Linux distribution comes with GNOME as the default GUI. The Linux open source community also created GNOME Extensions, which overcomes some of the infamous shortcomings of GNOME and extends the desktop functionality to suit a variety of needs. When it's not the default desktop environment (such as with Linux Mint's Cinnamon desktop), GNOME can easily be installed and adapted.
At the time of writing, the latest distributions of Ubuntu (20.04 LTS) and CentOS (8) have GNOME as their default GUI.
Let's look at a real-world scenario requiring the installation of the latest GNOME desktop.
Ubuntu Server administrator:
I installed the latest version of Ubuntu Server LTS (20.04), and it looks like the GUI desktop is missing. How do I install the GNOME desktop on my Ubuntu Server?
Let's look at how to install it on Ubuntu:
sudo apt-get update -y
Now, we can upgrade with this:
sudo apt-get upgrade -y
ubuntu-desktop
packages, run this:apt-cache search ubuntu-desktop
ubuntu-desktop
package (the first option in the preceding list):sudo apt-get install ubuntu-desktop -y
active (running)
status:systemctl status gdm
The expected response should be similar to Figure 1.22:
Figure 1.22 – Checking the status of GDM
The GNOME 3 desktop is now installed and active on Ubuntu Server (Figure 1.23):
Figure 1.23 – The Ubuntu GNOME desktop login screen
Next, let's take a look at the KDE desktop and a similar case study of enabling it on a Linux server platform.
Linux administrators usually look for a desktop environment that is relatively easy to use, lightweight, and efficient. KDE combines all of these attributes into a reliable and speedy desktop interface. Users familiar with Windows (up to version 7) would feel very much at home with KDE.
KDE has become a very robust desktop environment over the last few iterations, and versions of KDE have been released for almost every major Linux distribution.
If there's one ideal desktop for Linux administrators, KDE comes very close.
In this section, we take a fresh CentOS 8 installation with the default GNOME desktop enabled and replace it with KDE.
CentOS 8 administrator:
I installed the latest version of CentOS 8, choosing the "Server with GUI" option during setup. It looks like the CentOS 8 GUI runs the GNOME desktop. How do I install the KDE desktop on my CentOS 8 server?
When we click the cogwheel in the CentOS 8 login screen, we get a list of the currently installed display servers. The default is Standard, a GNOME implementation of the Wayland compositor protocol for Linux desktop management. Wayland also has a KDE implementation in its latest KDE Plasma iteration at the time of writing (Figure 1.24):
Figure 1.24 – The default CentOS 8 GNOME login screen
Let's add the KDE Plasma desktop to our CentOS 8 server:
Figure 1.25 – Opening the terminal in CentOS
packt
) to the sudoers
group. We need to switch to root to run the required command:su
packt
user to the sudoers
group, run this:usermod -aG wheel packt
sudoer
account:su - packt
packt
account does indeed have sudoer privileges:sudo whoami
The command should prompt for the packt
user password and then yield root
.
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
PowerTools
repository (needed by KDE). We use dnf
(Dandified YUM), a package manager CLI for RPM-based Linux distributions:sudo dnf -y config-manager --enable PowerTools
sudo dnf -y group install kde-desktop
When the kde-desktop
installation completes successfully, the output ends with a Complete!
message prompt.
gdm
) to account for the changes or simply reboot:sudo systemctl reload gdm
reboot
We are now able to log in to CentOS 8 using the KDE Plasma desktop. Clicking the cogwheel in the login window, we can see the Plasma desktop available (Figure 1.26):
Figure 1.26 – Choosing the KDE Plasma desktop
Figure 1.27 – Customizing the KDE Plasma desktop
In this section, we briefly looked at the Linux GUI and showcased the installation of the GNOME and KDE desktop environments on Ubuntu Server and CentOS, respectively. Next, we provide a quick guide on setting up a Linux workstation with some insight into various software packages and applications that could benefit our everyday work.