Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124

Changing the default environment on Ubuntu 26.04 allows you to tailor your desktop experience to match your workflow and preferences. Whether you prefer the polished look of GNOME, the customizability of KDE Plasma, or the lightweight efficiency of XFCE, Ubuntu makes it straightforward to switch between installed desktop environments. In this tutorial, you will learn how to change the default desktop environment on Ubuntu 26.04 using both the graphical login screen and the command line, and how to ensure your choice persists across reboots.
| Category | Requirements, Conventions or Software Version Used |
|---|---|
| System | Ubuntu 26.04 Resolute Raccoon – Download |
| Software | GDM3 (GNOME Display Manager), optionally SDDM or LightDM; at least two desktop environments installed (e.g., GNOME, KDE Plasma, XFCE, MATE) |
| Other | Privileged access to your Linux system as root or via the sudo command. |
| Conventions | # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
TL;DR
To change the default environment on Ubuntu 26.04, select a different session from the GDM login screen gear icon, or use the command line for system-wide changes.
| Step | Command/Action |
|---|---|
| 1. Check current DE | echo $XDG_CURRENT_DESKTOP |
| 2. List available sessions | ls /usr/share/xsessions/ /usr/share/wayland-sessions/ |
| 3. Change system-wide default | sudo update-alternatives --config x-session-manager |
| 4. Verify after reboot | echo $XDG_CURRENT_DESKTOP |
A desktop environment (DE) is the graphical interface layer that sits on top of the Linux kernel and system services. It provides everything you interact with visually: the panel, application menu, window manager, file manager, system settings, and more. Consequently, the desktop environment you choose has a significant impact on your daily workflow, resource usage, and overall experience.
Ubuntu 26.04 ships with GNOME as its default desktop environment. However, you can install additional desktop environments and switch between them freely. The most popular options available in the Ubuntu 26.04 repositories include:
| Desktop Environment | Package | Session Name | Character |
|---|---|---|---|
| GNOME (default) | ubuntu-desktop | ubuntu / gnome | Modern, streamlined, activity-based workflow |
| KDE Plasma | kde-plasma-desktop | plasma | Highly customizable, traditional desktop layout |
| XFCE | xfce4 | xfce / xfce-wayland | Lightweight, fast, low resource usage |
| MATE | mate-desktop-environment | mate | Traditional GNOME 2 fork, simple and stable |
Each desktop environment relies on a display manager (DM) to present the login screen and launch the chosen session. Ubuntu 26.04 uses GDM3 (GNOME Display Manager) by default. Other display managers include SDDM (commonly used with KDE Plasma) and LightDM (a lightweight cross-desktop option). Only one display manager can be active at a time on your system.
Before making any changes, it is useful to identify which desktop environment is currently active on your Ubuntu 26.04 system. Additionally, you should verify which sessions are installed and available for selection. Open a terminal and run the following commands:
ubuntu:GNOME. If you are running KDE Plasma, it will show KDE, and XFCE will display XFCE.wayland or x11. Ubuntu 26.04 defaults to Wayland for GNOME sessions. For more details on Wayland configuration, see how to set Wayland as default on your system..desktop files stored in two directories. List them with:$ ls /usr/share/xsessions/ /usr/share/wayland-sessions/Each filename (without the .desktop extension) represents a session you can select at the login screen. Note that XFCE appears in both directories: xfce-wayland.desktop under Wayland sessions and xfce.desktop under X11 sessions, which means you can run XFCE under either display protocol. MATE, on the other hand, only provides an X11 session, while KDE Plasma is available exclusively as a Wayland session./usr/sbin/gdm3.
The simplest way to change your default environment on Ubuntu 26.04 is through the GDM login screen. This method requires no command-line interaction and is therefore ideal for users who prefer a graphical approach.
IMPORTANT
GDM remembers your last selected session on a per-user basis. This means that once you select a desktop environment, it will automatically be used for all future logins until you change it again. Each user on the system can therefore have a different default desktop environment without affecting others.

For system-wide changes or when working on a headless system, you can change the default environment on Ubuntu 26.04 using command-line tools. There are several approaches depending on your specific needs.
The update-alternatives system manages symbolic links for default applications on Ubuntu, including the session manager. This method changes the system-wide default for all users.
/usr/bin/gnome-session, /usr/bin/startplasma-wayland, or /usr/bin/startxfce4./usr/bin/startplasma-wayland.Ubuntu’s display manager (GDM) uses AccountsService to store per-user session preferences. You can modify this directly to set a specific user’s default desktop environment without logging through the GUI.
.desktop extension. For example, plasma, xfce, mate, or gnome.[User] section and set or modify the Session and XSession keys:[User] Session=plasma XSession=plasma Icon=/home/linuxconfig/.face SystemAccount=falseReplace plasma with the session name that matches your desired desktop environment. Save the file and exit nano with Ctrl+O followed by Ctrl+X.If you want to switch the display manager itself (for example, from GDM to SDDM for better KDE Plasma integration), you can use dpkg-reconfigure:
sddm for KDE Plasma or lightdm for a lightweight option) and press Enter to confirm.DISPLAY MANAGER PAIRINGS
Common pairings are: GDM3 with GNOME, SDDM with KDE Plasma, and LightDM with XFCE or MATE. While any display manager works with any desktop environment, using the paired manager typically provides better integration and theming.
When you change the default environment on Ubuntu 26.04 through the GDM login screen, GDM automatically stores your selection in the AccountsService database. This means your choice persists across reboots without any additional configuration. However, understanding how this persistence works can help you troubleshoot issues and manage multi-user systems.
The per-user session preference is stored in /var/lib/AccountsService/users/. Each user has a configuration file in this directory. To verify your stored preference:
$ sudo cat /var/lib/AccountsService/users/linuxconfig
The Session key shows the session that GDM will load by default for that user. If you changed the system-wide default using update-alternatives, this affects the fallback session used when no per-user preference is set.
For a system-wide default that applies to all users who have not set a personal preference, you can also create a custom GDM configuration. Create or edit the following file:
$ sudo nano /etc/gdm3/custom.conf
Under the [daemon] section, add or modify:
[daemon] DefaultSession=plasma.desktop
Replace plasma.desktop with the session file name corresponding to your preferred desktop environment. After making changes, restart GDM or reboot:
$ sudo reboot
COMPLETED
After rebooting, verify the change was successful by opening a terminal and running echo $XDG_CURRENT_DESKTOP. The output should reflect your newly selected desktop environment.
Switching desktop environments does not always go smoothly. Here are some common issues you might encounter after changing the default environment on Ubuntu 26.04 and how to resolve them.
If a newly installed desktop environment does not appear in the GDM session selector, the session .desktop file may be missing. Verify that the session file exists:
$ ls /usr/share/xsessions/ /usr/share/wayland-sessions/
If the session file is not present, the desktop environment package may not have installed completely. Try reinstalling it:
$ sudo apt install --reinstall kde-plasma-desktop
Additionally, you may need to restart the display manager for the new session to appear:
$ sudo systemctl restart gdm3
If your session reverts to GNOME after a reboot, check the AccountsService configuration for your user:
$ sudo cat /var/lib/AccountsService/users/linuxconfig
Make sure the Session key is set to the correct session name. If it keeps resetting, another process may be overwriting it. In that case, ensure you are not running any login scripts that reset the session variable.
A black screen or login loop can occur if the selected desktop environment has unmet dependencies or conflicting packages. To recover, switch to a virtual terminal by pressing Ctrl+Alt+F3 and log in with your credentials. Then, reset the session to GNOME:
$ sudo nano /var/lib/AccountsService/users/linuxconfig
Change the Session value back to ubuntu and reboot. You can also try reconfiguring the display manager:
$ sudo dpkg-reconfigure gdm3
When multiple desktop environments are installed, each may install its own display manager. If you experience unexpected behavior, verify which display manager is active:
$ cat /etc/X11/default-display-manager
If the wrong display manager is set, reconfigure it using the method described in the previous section. Furthermore, your default firewall configuration should not interfere with display manager operation, but ensure no rules are blocking local connections if you encounter unusual issues.
Changing the default environment on Ubuntu 26.04 is a flexible process that can be accomplished through either the graphical login screen or the command line. The GUI method via the GDM gear icon is the quickest approach for individual users, while the command-line methods using update-alternatives and AccountsService provide greater control for system administrators and automated setups. Regardless of the method you choose, Ubuntu’s AccountsService ensures your preference persists across reboots. If you encounter issues, the troubleshooting steps covered in this tutorial should help you recover and get your preferred desktop running smoothly. For further information, refer to the official Ubuntu documentation on switching desktop environments.
sudo apt remove followed by the meta-package name (e.g., sudo apt remove kde-plasma-desktop). Afterward, run sudo apt autoremove to clean up orphaned dependencies. You may also want to reconfigure your display manager if the removed DE’s display manager was active.update-alternatives method, on the other hand, changes the system-wide default session manager. This affects the fallback session used when no per-user preference is configured, making it useful for setting defaults on multi-user systems.