How to Install Desktop on Ubuntu Server 24
If you want a GUI for your Ubuntu Server, you need to install a Linux desktop environment. For Ubuntu Server, the XFCE desktop is recommended. XFCE is lightweight and works well with remote desktop tools like VNC Server.
To install the XFCE desktop environment on Ubuntu Server 24, run the following command:
sudo apt update
sudo apt-get install xfce4 xfce4-goodies lightdm-gtk-greeter dbus-x11 autocutsel
After installing XFCE, run the systemctl get-default
command to ensure that the systemd target is set to graphical.target
:
systemctl get-default
By default, it should be set to graphical.target
after installing XFCE. If not, run the following command to set the systemd target to graphical.target
:
sudo systemctl set-default graphical.target
Finally, restart the Ubuntu Server:
sudo systemctl reboot
After the system reboots, it should start with the graphical user interface.


Disable the Graphical User Interface
If you need to disable the graphical user interface for any reason, set the systemd target to multi-user.target
and restart the server.
sudo systemctl set-default multi-user.target
multi-user.target
= Text mode (no GUI)graphical.target
= Multi-user + GUI
Next Step: Install Remote Desktop
You have successfully installed a desktop environment on your Ubuntu Server. However, if your server is remotely located, you'll need to set up remote desktop software to access the graphical user interface.
For Ubuntu Server 24, we recommend using VNC Server. You can find the full installation guide here.