As you might know, Linux-based operating systems are heavily focused on the command line for performing operations. A minimal distro like Arch Linux will present you with a dark terminal post-installation. What makes Linux distros interactive and user-friendly often goes unnoticed—the desktop environment.
Most beginner Linux users are unaware of desktop environments and don't even know which one they're using. Here's how you can check which desktop environment is currently installed on your Linux system.
What Is a Desktop Environment?
A desktop environment is a collection of programs responsible for making the operating system interactive for the users; a front-end for the base OS if you will.
Most Linux desktop environments consist of a window manager and several applications that support other elements of the environment. For example, KDE, or the K Desktop Environment uses the KWin window manager and comes with additional apps such as Konsole and Ark, responsible for helping users in accessing the command line and managing archives respectively.
A window manager usually runs on top of a windowing system. A windowing system consists of icons, windows, menus, and other elements that make up the graphical user interface. The desktop environment might also include widgets that bring additional functionality to the table.
Some of the more widely-used desktop environments are:
- GNOME
- KDE
- MATE
- Xfce
- Cinnamon
And the list goes on...
Check Your Current Desktop Environment on Linux
With so many desktop environments available for free, it becomes really hard for users to choose what fits their tastes. And not knowing which DE they're currently using doesn't make the situation any better.
There are multiple ways to check which DE is installed on your Linux distro, both command-line and graphical.
Using Environment Variables
On Linux, environment variables store system-related data required by processes and apps to function properly. You can view the value of some specific environment variables that store information about your system's desktop environment.
Run the following command:
echo $XDG_CURRENT_DESKTOP
The output will display the name of your desktop environment.

You can also view the *-session binary file usually found under the /usr/bin directory to achieve similar results.
ls /usr/bin/*-session
Taking a quick look at the entries displayed gives an idea about the system's desktop environment. As you can see, the xfce4-session file denotes that the system is using Xfce.

Using Neofetch
Neofetch is a command-line tool that displays system-related information in a presentable format. Neofetch isn't a part of the standard Linux packages, so you'll have to manually install it on your system.
Once installed, run the following command to launch Neofetch:
neofetch
Output:

Apart from the desktop environment, Xfce 4.16 in this case, Neofetch displays the OS name, kernel version, hostname, display resolution, shell name, and more.
Using the GUI
It will come as no surprise that you can also check the name of your desktop environment using the desktop environment itself i.e. graphically. You can head over to your system settings to view the About section to get details regarding your OS. While not all desktops will have this option, most of them do, and if yours does too, consider yourself lucky.
For example, on the GNOME desktop, you can quickly check system details using the About section found in Settings.

Still no joy? You can simply google what desktop environment comes with your Linux distro by default. Because in most cases, you'll still have the default DE installed, unless you changed it manually, of course.
Linux Without a Desktop Environment?
Now that you know what role desktop environments and window managers play, it is time to embrace the power Linux provides to its users. You can even choose to use your system without a desktop environment at all. Although that wouldn't be recommended unless you really love darkness and are a Linux geek.
Those who still want to continue using a desktop environment can experiment with different desktops before choosing "the one." You can install desktop environments and window managers as you normally install other programs on Linux.
0 Comments