How to install XFCE on CentOS 7

Endrit Qerreti

Endrit Qerreti

In this tutorial you will learn how to install XFCE desktop environment on CentOS 7.

CentOS 7 comes with Gnome desktop environment by default, which is heavier than XFCE and it doesn't run that smoothly especially if you are installing centos 7 on a computer with low specs.  

Follow the steps below to install XFCE on CentOS 7.

Step 1 - Install EPEL release

Simply run the command below to install epel release, this repository contains all packages that we'll need to install XFCE

sudo yum install epel-release -y

Once epel has been installed, it should look like this

Step 2 - Install Window-x system

Once you've installed the epel release now you can proceed with the installation of Window-x system by running the command

sudo yum groupinstall "X Window system" -y

As you can see on the screenshot above Window-x system got installed correctly, now you can proceed to the next step which installs the desktop environment, in this case XFCE.

Step 3 - Install XFCE

Run the command below and grab a coffee :) as the setup might take awhile depending on your computer specs and internet speed.

sudo yum groupinstall "Xfce" -y

Starting the GUI

After you have successfully installed all the packages needed and XFCE desktop, you need to start the graphical user interface, in other words you are telling the os to start the GUI because there will be no gui loaded even after you have completed the 3 steps above, so to do this simply run the command

sudo systemctl isolate

and you should see the display manager "gdm" window, shown as below

Next, enter your username and click "Next, then click to the gear icon and select "Xfce Session" to login to xfce

Final Step - Enable GUI on boot

This step is very important because to avoid starting gui manually each time by the command above, you can enable gui on boot, so when os boots up it will automatically start the gui also.

sudo systemctl set-default

Now, you can reboot and login to your server, on this step you can choose to start with an empty panel or simply go with the default one by clicking the "Use default config" so you don't have to create an panel and adding items to it manually.

And that's it! Once you click "Use default config" button the panel shows up and the system is ready to use.


In this tutorial you learned how to install XFCE desktop environment on CentOS 7. Personally I like XFCE more because of performance and stability, I love it. However, that's just my opinion and it shouldn't stop you from trying gnome or other desktop environments.