How to install Xfce on Debian 11

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to install Xfce on Debian 11.

If you are using Debian on your machine, and want to replace the default desktop environment with Xfce, you can easily do so, but you must install Xfce first.

Xfce is not preinstalled by default on Debian, as gnome is the default desktop environment. However, Xfce can be installed on Debian 11 and 12 very easily via the tasksel app.

Step 1 - Update system

Before we begin with this tutorial, you need to make sure that your system is up to date.

Whether you are running Debian 11 or 12, you can easily update them from the terminal.

To do so, simply execute the command below.

sudo apt update && apt upgrade -y

Step 2 - Install Tasksel

Now that your system is up to date, and all packages updated, you can proceed to install Tasksel.

Tasksel is the installer that is used when you install Debian. However, tasksel can also be used after the installation process.

Tasksel can be easily installed on Debian 11 and 12 via apt as tasksel is available in the default repositories of Debian.

To do so, simply run the command below.

sudo apt install tasksel

Step 3 - Install Xfce

Now that tasksel is installed in your system, you should be able to install Xfce.

To do so, first launch your terminal, and run the command below to launch Tasksel.

sudo tasksel

Once tasksel is launched, you will see the following screen. Debian desktop environment and gnome are selected by default.

To avoid reinstalling gnome, ensure that only "Xfce" is selected.

To do so, simply select "Xfce" and press the "Ok" button to proceed installing Xfce.

Note: If you encounter the error "tasksel: apt-get failed (100)", it can be fixed easily by following our tutorial.

And Xfce installation process should start, all you have to do now is wait for Xfce to get installed.

Step 4 - Use Xfce

Xfce should be now installed in your Debian machine, and you should be able to use it.

First, you need to logout from the current session.

You can logout by clicking Panel > Power Off / Log Out > Logout

Next, select the user that you want to log in to.

You will see all users that you have currently in your system. For example, we have only one user created, that's why it's showing only one user.

Once you have selected the user, now you need to select "Xfce".

To do so, simply click to the gear icon, and then choose "Xfce Session"

And you will be logged in using Xfce desktop environment.


In this tutorial, you learned how to install Xfce on Debian 11 via tasksel.

By now you should be able to use Xfce on your Debian 11 machine.

Even though we used Debian 11 in this tutorial, you can install Xfce on other Debian distros by using the same cli app tasksel.