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.
In this tutorial you will learn:
- What desktop environments are available on Ubuntu 26.04
- How to check your currently active desktop environment
- How to switch the default environment from the GDM login screen
- How to change the default environment using command-line tools
- How to make your desktop environment change permanent
- How to troubleshoot common issues after switching environments
Software Requirements
| 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 |
| 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 |
Understanding Desktop Environments on Ubuntu 26.04
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.
Checking Your Current Default Environment
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:
- Check the active desktop environment: Run the following command to display the name of your current DE:
$ echo $XDG_CURRENT_DESKTOP
On a default Ubuntu 26.04 installation, this will output
ubuntu:GNOME. If you are running KDE Plasma, it will showKDE, and XFCE will displayXFCE. - Check the session type: To determine whether you are running a Wayland or X11 session, use:
$ echo $XDG_SESSION_TYPE
The output will be either
waylandorx11. 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. - List all available desktop sessions: Desktop sessions are defined by
.desktopfiles stored in two directories. List them with:$ ls /usr/share/xsessions/ /usr/share/wayland-sessions/
Each filename (without the
.desktopextension) represents a session you can select at the login screen. Note that XFCE appears in both directories:xfce-wayland.desktopunder Wayland sessions andxfce.desktopunder 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. - Check the current display manager: To identify which display manager is handling your login screen:
$ cat /etc/X11/default-display-manager
On a default Ubuntu 26.04 system, this returns
/usr/sbin/gdm3.


Changing the Default Environment Using the Login Screen
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.
- Log out of your current session: Save all your work, then log out from the system menu in the top-right corner of the GNOME desktop. Alternatively, you can log out from the terminal:
$ gnome-session-quit --logout --no-prompt
- Select your username on the login screen: On the GDM login screen, click on your username to select it. Do not enter your password yet.
- Open the session selector: After selecting your user, look for a gear icon in the bottom-right corner of the login screen. Click this gear icon to reveal a list of all available desktop environments.
- Choose a different desktop environment: Select the desktop environment you want to use from the dropdown list. For example, choose “Plasma (Wayland)” for KDE Plasma, “Xfce Session” for XFCE, or “MATE” for the MATE desktop.
- Enter your password and log in: Type your password and press Enter. The selected desktop environment will load instead of the previous default.


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.
Changing the Default Environment via Command Line on Ubuntu 26.04
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.
Method 1: Using update-alternatives
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.
- List available session managers: First, check which session managers are registered on your system:
$ sudo update-alternatives --list x-session-manager
This will output paths to available session managers, such as
/usr/bin/gnome-session,/usr/bin/startplasma-wayland, or/usr/bin/startxfce4. - Select a new default session manager: Run the interactive configuration command:
$ sudo update-alternatives --config x-session-manager
You will see a numbered list of all available session managers. Enter the number corresponding to your preferred desktop environment and press Enter. For instance, to switch to KDE Plasma, select the entry pointing to
/usr/bin/startplasma-wayland.
Method 2: Editing AccountsService Configuration
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.
- Identify available session names: List the session files to find the exact session name you need:
$ ls /usr/share/wayland-sessions/ /usr/share/xsessions/
Note the filename without the
.desktopextension. For example,plasma,xfce,mate, orgnome. - Edit the AccountsService user file: Open the configuration file for your user account:
$ sudo nano /var/lib/AccountsService/users/linuxconfig
Locate the
[User]section and set or modify theSessionandXSessionkeys:[User] Session=plasma XSession=plasma Icon=/home/linuxconfig/.face SystemAccount=false
Replace
plasmawith the session name that matches your desired desktop environment. Save the file and exit nano withCtrl+Ofollowed byCtrl+X. - Reboot to apply the change:
$ sudo reboot
After rebooting, GDM will read the updated AccountsService file and automatically log you into the specified desktop environment.
Method 3: Changing the Display Manager
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:
- Reconfigure the display manager: Run the following command to open the display manager selection dialog:
$ sudo dpkg-reconfigure gdm3
A dialog will appear listing all installed display managers. Use the arrow keys to highlight your preferred display manager (e.g.,
sddmfor KDE Plasma orlightdmfor a lightweight option) and press Enter to confirm. - Reboot your system: The change takes effect after a reboot:
$ sudo reboot
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.


Making the Change Permanent
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.
Troubleshooting Common Issues
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.
Desktop environment not appearing on the login screen
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
Session falls back to GNOME after reboot
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.
Black screen or login loop after switching
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
Display manager conflict
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.
Conclusion
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.
Frequently Asked Questions
- Can I have multiple desktop environments installed at the same time on Ubuntu 26.04? Yes, you can install as many desktop environments as you like on a single Ubuntu 26.04 system. Each one will appear as an option in the login screen session selector. They share the same underlying system and user files, so you can switch freely between them without losing data. However, keep in mind that multiple DEs will consume additional disk space and may occasionally introduce minor theming conflicts.
- Will changing my desktop environment affect my files and applications? No, switching the desktop environment does not modify your personal files, installed applications, or system configuration. Your documents, downloads, and application data remain intact. However, some desktop-specific settings (such as panel layout or keyboard shortcuts) are stored separately for each DE, so those will differ between environments.
- How do I completely remove a desktop environment I no longer need? To remove an unwanted desktop environment, first ensure you are logged into a different DE. Then use
sudo apt removefollowed by the meta-package name (e.g.,sudo apt remove kde-plasma-desktop). Afterward, runsudo apt autoremoveto clean up orphaned dependencies. You may also want to reconfigure your display manager if the removed DE’s display manager was active. - What is the difference between changing the session at the login screen and using update-alternatives? The login screen method changes the default session for a single user only. GDM stores this preference in AccountsService and remembers it for future logins. The
update-alternativesmethod, 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.
PakarPBN
A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.
In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.
The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.
