Does Ubuntu Server Have a GUI? How to Install One

Does Ubuntu Server come with a GUI by default?
No. The installation of Ubuntu Server comes with the command line interface only—without any desktop environment, display server, and window manager. The rationale behind it lies in engineering: the server is supposed to be headless and manage through SSH, without consuming any resources which can be used for services operation.
This is also shown in Ubuntu Server's system requirements documentation. The minimal RAM recommended for installing Ubuntu Server 24.04 LTS ISO is 1.5 GB (with 1 GB for cloud image). 3 GB of RAM is recommended for any configuration which is beyond minimal. In contrast, the current Ubuntu Desktop, which comes with the GNOME environment installed by default, recommends at least 6 GB of RAM just for installation, not counting any applications. The reason is quite simple—desktop environment components (display server, window manager, panel, notification daemon, and applications) take considerable amount of resources.
If you need a GUI interface, there is nothing which will prevent you from installing it.
Reasons behind the absence of GUI in Ubuntu Server
There are two basic rationales for this: resource optimization and reduced attack surface.
The first point is rather obvious—the GUI consumes quite a lot of memory which is unnecessary for headless service. Every additional byte which will be taken by the graphical interface on VPS with limited RAM allocation reduces amount of memory which is available for your configured workload.
The second rationale is less obvious. Ubuntu's community server documentation has long advised against installing a GUI on production servers. According to their advice, every additional package means additional surface for patches and potential source of failure, even if the interface itself will never be exposed to the Internet.
None of these points make the installation of GUI impossible. There are plenty of legitimate configurations which require desktop environment; the only point here is that Ubuntu Server installation does not come with any.
When GUI installation is necessary?
There are several configurations which repeat themselves quite often:
requirements of GUI-only software;
learning and initial server administration: if you do not know how to administer a Linux server, then using file managers, graphical text editor, and system monitor is easier way;
troubleshooting of the display, graphics drivers, GUI-only installer, or configuration panels.
Outside these configurations, a combination of command line and htop, ncdu, byobu is enough for most administration purposes without additional overhead from the GUI.
Which desktop environment should be used?
Ubuntu has a few different desktop environments which can be installed in exactly the same way, except for resource consumption during idling:
Desktop environment | Package name | Best for |
|---|---|---|
GNOME (full) |
| The most standard environment for Ubuntu |
GNOME (minimal) |
| GNOME Shell without any applications |
Xfce |
| For remote access through VNC/RDP or low-powered hardware |
MATE |
| Traditional interface with moderate resource consumption |
KDE Plasma |
| Rich and customizable |
LXQt |
| Smallest footprint of the group |
For remote access to the server, Xfce is usually the best practical choice because of lower resource consumption and better performance through VNC.
How to install GUI on Ubuntu Server?
There are two methods to install the GUI on Ubuntu Server 24.04 (and other recent versions)—tasksel or apt. As Tasksel ships pre-installed on Ubuntu Server editions (and not pre-installed in Desktop ones), it will usually work faster than apt.
Update the package index.
sudo apt update && sudo apt upgrade -yInstall using tasksel.
sudo tasksel install ubuntu-desktopUse xubuntu-desktop, ubuntu-mate-desktop, kubuntu-desktop, or lubuntu-desktop if you need the other environment.
Or install using apt.
sudo apt install ubuntu-desktopBoth commands download the packages for desktop environment, display manager, and applications for selected environment. The downloaded files may be really big (several gigs) and depend on your connection speed.
Reboot and check the boot target.
sudo reboot
sudo systemctl get-defaultAfter the installation, the default boot target will usually be left as multi-user.target (which is text mode). To start into the desktop environment each time:
sudo systemctl set-default graphical.targetTo start into the desktop environment once without changing the default:
sudo systemctl isolate graphical.targetHow to manage the remote access to the desktop?
The vast majority of Ubuntu Server deployments are done in headless hardware (VPS or dedicated server) without attached display; in such conditions, GUI access is useful only in case it can be done remotely. There are two major ways:
VNC allows remote desktop access. TigerVNC is the commonly recommended VNC server for Ubuntu 24.04; but GNOME 24.04 runs by default in Wayland session, which TigerVNC cannot access without forcing an X11 session in VNC startup script. Xfce avoids this problem because it uses X11 by default.
xrdp allows much simpler way of accessing desktop through RDP protocol. Just install it with
sudo apt install xrdpand it will recognize and use your current desktop environment.
In any case, try to avoid opening ports 5901 (for VNC) and 3389 (for RDP) to Internet; either use SSH tunneling or firewall rules which will limit access to specific IP addresses only.
How to remove the GUI if it is not needed anymore?
If you have installed desktop environment only for troubleshooting or evaluating it, you can remove it with the following command:
sudo apt remove --purge ubuntu-desktop gdm3 -y
sudo apt autoremove --purge -y
sudo systemctl set-default multi-user.target
sudo rebootReplace gdm3 with lightdm if you have used another display manager. The autoremove step is important because it removes dependent packages which were not removed automatically.
Notes on resource consumption
Installation of GUI is easy; managing the resulting overhead is essential. In case of VPS with limited resources, GUI environment is another component which competes with configured server workload for memory and other resources. Dedicated or bare-metal server gives more room, but even in such conditions, lightweight environments (such as Xfce) are preferable when GUI is a convenience, but not necessity.
For deployments of Ubuntu Server on the limited-resource infrastructure, consider upgrading to a VPS with more RAM or using bare-metal server in order to have enough headroom for running desktop environment.
Get started with Orbit Servers
Low-latency VPS, bare metal, and colocation across the US, EU, and APAC - provisioned instantly and built for performance-critical workloads.
Get startedRelated products
Written by
Julius
Product Manager
Julius is a product-minded builder who cares about making technology simpler and more useful for the people who rely on it. He’s always looking for ways to improve things, one small step at a time, and enjoys turning good ideas into products that work.