Skip to content

How to Detect the Desktop Environment in Linux Command Line

There are multiple options available to identify the running desktop environment on a Linux desktop. Here we discuss two commonly used options. First, execute the following command to check the name of the Desktop Environment.

echo $XDG_CURRENT_DESKTOP

In addition, you can also identify the Desktop by checking the currently running processes. Like the following command will show you the processes running for XFCE or KDE or GNOME desktops.

ps -e | grep -E -i "xfce|kde|gnome"

You will see the results like below. As per the below result, the GNOME desktop is being used on this system.

find desktop environment

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

Leave a Reply

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


Back to top