How to Install Xfce on Ubuntu 22.04 or 20.04

If you’re using Ubuntu, you’re likely familiar with the GNOME desktop environment, which is the default for most Ubuntu installations. However, you have another excellent option: the XFCE desktop environment. This guide will show you how to install XFCE on Ubuntu 22.04 Jammy Jellyfish or the older stable release of Ubuntu 20.04 Focal Fossa.

Why Consider XFCE Over GNOME?

  • Resource Efficiency: XFCE is lightweight and uses fewer system resources than GNOME. This is especially useful for older computers or systems with limited hardware, as it can lead to faster boot times and smoother performance.
  • Customization: XFCE allows for a high level of customization. You can change the panel layout, window manager settings, and much more to make the desktop environment fit your needs.
  • Simplicity: The XFCE desktop environment is designed to be simple and easy to use. The interface is clean and straightforward, making it user-friendly.
  • Stability: XFCE is a mature and stable desktop environment. You can rely on it to run smoothly and without issues.
  • Software Compatibility: Like GNOME, XFCE is compatible with various software, including GTK-based programs. This means you can continue to use your favorite applications without worrying about compatibility.

Given these advantages, XFCE offers a compelling alternative to GNOME for Ubuntu users. Whether you want to optimize system performance or try a new desktop environment, XFCE is a strong contender.

In the upcoming guide, we’ll provide step-by-step instructions on how to install XFCE on Ubuntu 22.04 Jammy Jellyfish or Ubuntu 20.04 Focal Fossa. The same methods can also be applied to short-term Ubuntu releases that have not yet reached their end-of-life. Depending on your Ubuntu version, you may get a different XFCE version. Stay tuned for the detailed steps to enhance your Ubuntu experience with XFCE.

Step 1: Update Ubuntu Before Xfce Installation

Before starting the installation process, ensuring your system is up-to-date is important. Open a terminal and run the following command.

sudo apt update && sudo apt upgrade

Step 2: Install Xfce on Ubuntu 22.04 or 20.04

The next step is to install the Xfce desktop environment on Ubuntu. Run the following command in the terminal:

sudo apt install xfce4 xfce4-goodies

Once you have installed the Xfce desktop environment, the final step is to restart your system. This can be quickly done by entering the following command into your terminal.


Step 3: Log in to XFCE on Ubuntu 22.04 or 20.04

After restarting your desktop, you’ll be brought to the login screen. Before logging in, you must switch to the Xfce desktop environment. To do this, click on the settings icon in the top right corner of the screen and select “Xfce Session” instead of the default “Ubuntu (Default).”

Changing desktop environment to XFCE session on Ubuntu 22.04 or 20.04 login screenPin
Screenshot showing how to change your desktop environment to XFCE at the Ubuntu 22.04 or 20.04 login screen.

Now that you’ve successfully installed the Xfce desktop environment on Ubuntu, it’s time to explore its unique features. Upon logging in, you’ll immediately notice several visual changes, including a color scheme and background change. Despite its lightweight design, Xfce offers a sleek and modern user interface.

To fully experience the power of Xfce, it’s essential to make a few simple configurations for your system. One of the first things you should do is customize your desktop background and other visual elements, such as color schemes and icon sets. Additionally, check out popular Xfce features like the panel, window manager, and application launcher, which can be customized to meet your needs.

Another great thing about Xfce is its wide range of popular applications and tools, such as the Thunar file manager, the Xfce Terminal, and the Xfce Calculator. These applications have been designed to work seamlessly with the Xfce desktop environment, ensuring users’ smooth and seamless experience.

Xfce Desktop Screenshots (Ubuntu 22.04 XFCE Examples)

These screenshots give a glimpse into the Xfce desktop environment on Ubuntu. It’s worth noting that while different versions of Ubuntu or software updates may cause slight changes to the appearance, these images still offer a general idea of what your desktop may look like once you’ve installed Xfce.

XFCE applications menu and taskbar on Ubuntu 22.04 or 20.04Pin
Example screenshot showing the XFCE applications menu and taskbar on Ubuntu 22.04 or 20.04.
XFCE folder interface with dark theme on Ubuntu 22.04 or 20.04Pin
Example screenshot showing the folder interface in a dark theme on XFCE installed on Ubuntu 22.04 or 20.04.
XFCE log out, restart, shutdown, and suspend feature menu on Ubuntu 22.04 or 20.04Pin
Example screenshot showing the XFCE system options menu for log out, restart, shutdown, and suspend on Ubuntu 22.04 or 20.04.

Managing XFCE on Ubuntu 22.04 or 20.04

Managing a desktop environment like XFCE on Ubuntu Linux involves more than just the initial setup. It’s critical to continually update the environment, understand the process of switching display managers, and be able to remove the XFCE desktop if required. This section will cover these crucial aspects of XFCE desktop management.

Updating XFCE and Associated Packages on Ubuntu 22.04 or 20.04

The importance of keeping your system updated cannot be overstated. Regular updates bring new features, patch security vulnerabilities, and improve overall performance. The XFCE desktop environment is part of this update cycle. To initiate the update, you’ll need to use apt commands.

First, execute the following command to refresh your package list:

sudo apt update

This command fetches the latest package metadata from the repositories, ensuring you know the most recent versions.

If the system finds any updates during the refresh, run the following command to upgrade your installed packages:

sudo apt upgrade

This command downloads and installs the latest versions of the packages you have on your system, including XFCE. It ensures that your desktop environment stays up-to-date with the latest bug fixes and security patches.

Switching Between Display Managers

XFCE generally employs LightDM as its default display manager. However, if you switch to another desktop environment like GNOME, you may prefer using GDM3 as the display manager. Changing the display manager is a straightforward process.

Execute the following command to start the reconfiguration:

sudo dpkg-reconfigure lightdm

After running this command, a prompt will appear, allowing you to select your desired display manager. Ensure to reboot your system for the changes, as the display manager only switches during the boot process.

Removing XFCE from Ubuntu Linux

There could be scenarios where you want to remove XFCE from your system—maybe you wish to try out a different desktop environment, or perhaps you want to revert to a previous setup. To altogether remove XFCE and its related files, execute the following command:

sudo apt autoremove '^xfce' --purge

This command eliminates XFCE and any associated files, reverting your desktop environment to its previous state.

If you plan to reinstall the GNOME Desktop Environment after removing XFCE, you’ll need to refresh your package list and reinstall the necessary packages as follows:

sudo apt update
sudo apt install gnome gdm3 task-gnome-desktop --reinstall

Before rebooting, ensure that GDM3 is set as the active display manager. If you overlook this step, you may find yourself in a terminal or text-based login interface. To avoid this, activate GDM3 by executing:

To finalize all changes, a system reboot is necessary:

sudo reboot

This action will reboot your system, thereby implementing all your changes.


This article showed you how to install the Xfce desktop environment on Ubuntu. Xfce is a fast and lightweight desktop environment with many customization options. Following the steps outlined in this guide, you can have Xfce up and running on your Ubuntu system in no time.

For further information on using the Xfce desktop environment, visit the official documentation.

Share to...