Ubuntu Server boots to a text prompt, and one apt command puts a desktop environment on the disk. Seeing that desktop is the step that catches people out.
A server has no monitor and SSH carries no pixels, so the greeter starts, runs, and draws to nothing you can look at. I ran the sequence on Ubuntu 26.04.1 with gdm3 50.1, lightdm 1.32.0 and xrdp 0.10.1 to record what each step changes.
What Ubuntu Server leaves out, and what a desktop adds back
A desktop environment is four pieces stacked on one another, and an Ubuntu Server install ships none of them.
The display server gives applications somewhere to draw. A window manager decides where each window sits and how it is resized, and the display manager owns the login screen.
The fourth piece is the session, which starts your panel, browser and file manager once you are past the prompt.

Ubuntu’s own server guidance is blunt that a production server rarely needs any of this, and lists the costs plainly: more packages to update, more services listening, more memory in use.
That trade pays off when the machine runs a graphical tool you cannot drive from a terminal. I measured the disk cost of each option on a clean 26.04.1 image so the choice becomes a number instead of a habit.
What you need before the first apt command
You need sudo, a release you can name, and somewhere between 3 GB and 4 GB of free disk once apt has unpacked everything.
| Choice | Command | Download | Installed |
|---|---|---|---|
| GNOME, minimal set | sudo apt install ubuntu-desktop-minimal | 714 MB | 2555 MB |
| GNOME, full set | sudo apt install ubuntu-desktop | 863 MB | 3105 MB |
| Xfce | sudo apt install xubuntu-desktop | 1019 MB | 3807 MB |
| LXQt | sudo apt install lubuntu-desktop | 1087 MB | 3724 MB |
| KDE Plasma | sudo apt install kubuntu-desktop | 1281 MB | 4168 MB |
| Window manager only | sudo apt install –no-install-recommends xorg openbox lightdm lightdm-gtk-greeter | 116 MB | 454 MB |
Those figures are the archive sizes apt resolves on 26.04.1, dependencies included, which is why they are larger than a single metapackage suggests. Xfce, LXQt and Plasma each pull a different toolkit, so the difference between them is disk you have to allocate.
Pick one desktop and install its metapackage, then leave the display manager choice to that metapackage unless you have a reason to override it. Installing a second display manager afterwards does not move the login screen, which is a step I would rather you skip than debug.
A working SSH session matters more than a spare monitor here, because every step from this point runs over the connection you already have. If you signed in as a user without sudo rights, add that user to the sudo group before anything else. If the machine is an Ubuntu Server guest in VirtualBox, take a snapshot first so a desktop you dislike costs nothing to discard.
Install the desktop
Each option below is one command and the same shape: refresh the package index, install the metapackage, then reboot when apt finishes. The 26.04 metapackages come from the archive your server already uses, so no extra repository is involved.
The smallest GNOME desktop
ubuntu-desktop-minimal is the set Ubuntu Desktop itself installs, and it is the one to take when you want the standard experience without the extra applications.
sudo apt update
sudo apt install ubuntu-desktop-minimal
On a clean 26.04.1 machine that resolves to 1222 packages and about 714 MB of download. apt reports 2555 MB of space in use afterwards, which is more than the download because it counts the unpacked files.
I let the install run to completion on a machine with no display attached, and it finished without touching the services that were already running.
The complete Ubuntu desktop
ubuntu-desktop adds the recommended application set on top of the same desktop, which is where LibreOffice, Shotwell and the printer tools come from.
sudo apt install ubuntu-desktop
It resolves to 1364 packages and roughly 863 MB on 26.04.1. That is about 149 MB of extra download for applications a server may never open.
A window manager and a login prompt only
When all you want is an X server and something to log into, install the window manager and the greeter directly, because the desktop metapackage is what brings the rest. The X server is its own install, and Xorg on Linux covers what the package contains and how it relates to Wayland.
sudo apt install --no-install-recommends xorg openbox lightdm lightdm-gtk-greeter
That is 246 packages and about 116 MB, and it lands you in an openbox session with a right-click menu and nothing else on screen. The difference between a desktop environment and a window manager is the difference between that session and the GNOME one you install with the metapackage.

I kept the recommends flag off on purpose. With recommends enabled, lightdm pulls a greeter theme and a session stack that assume a full desktop is already present.
What the recommends flag changes
Recommends are packages the maintainer considers usual but not required, and apt installs them unless you say otherwise. Skipping them is what turns a 3807 MB Xfce install into the 116 MB openbox stack, and the apt command reference covers the flags that decide it.
The trade is that you assemble the rest by hand, which suits a server and wears thin on a machine you plan to sit in front of. If you want a desktop rather than a framework, take the metapackage and accept the size.
Make the server boot into the desktop
Ubuntu already boots to graphical.target, which is the target that pulls a display manager in, so the target is usually not what is missing.
The unit that decides the login screen is display-manager.service, and installing a desktop writes that alias so it points at the greeter. Read both back before you change anything.
systemctl get-default
readlink /etc/systemd/system/display-manager.service
systemctl is-active display-manager
| Check | What it answers |
|---|---|
| systemctl get-default | which target the machine boots into |
| readlink /etc/systemd/system/display-manager.service | which display manager owns the login screen |
| systemctl is-active display-manager | whether that display manager is running now |
On Ubuntu 26.04.1 the readback is graphical.target with /lib/systemd/system/gdm3.service on the alias, because the gdm3 package claims the alias when it configures itself. Only one display manager can hold it at a time, so a second one you install later sits inert until something hands it the alias.
When the target and the alias are both in place, the greeter starts at boot and the machine runs a desktop whether or not anything is plugged into it.
Reach the desktop over RDP
A greeter on a headless server draws to a console nobody is looking at, so the session you want is the one a remote protocol hands to your laptop. If you have run a desktop only on a machine with a screen, the same idea on a Raspberry Pi board is worth a read.
xrdp is the RDP server in the Ubuntu archive, and it listens on the port Windows Remote Desktop uses, so any client you already have will connect to it.
sudo apt install xrdp
sudo systemctl enable --now xrdp
sudo systemctl status xrdp

I started the service and confirmed the socket on 3389, because that check separates a client problem from a server that is not listening. With no listener, nothing on the network reaches the machine.
Point your RDP client at the server address and sign in with the Linux account you created during the install. The login screen offers an Xorg session and an Xvnc session, and Xorg is the one that starts a fresh desktop for you.
Open port 3389 in the firewall before you test, and restrict it to addresses that should reach the machine. AnyDesk is the alternative when you would rather not expose an inbound port, because it reaches out through the vendor’s relay instead.
Verify the stack from the command line
Server-side verification is short, and each check answers a different question.
- systemctl get-default returns graphical.target
- systemctl is-active display-manager returns active
- systemctl is-active xrdp returns active once remote access is installed

I ran those three against the finished install and got graphical.target, active and active, which is the shape of a working stack. Anything other than active on the second check sends you back to the alias.
Versions are the other half of the check, because a stale metapackage explains behaviour that looks like a fault.
dpkg-query -W -f='${Package} ${Version}\n' ubuntu-desktop-minimal gdm3 xrdp
Nothing on the command line shows you the desktop itself, which is why you connect a client. A desktop that looks wrong in an RDP session is usually a session type or a toolkit mismatch rather than a failed install.
When the desktop does not appear
Nearly every report of a desktop that installed cleanly and then did nothing on screen lands in one of three states.
| Symptom | What it means | Check |
|---|---|---|
| The reboot drops to a text prompt | The greeter is running with no display to draw on, and you are looking at the console through SSH | systemctl is-active display-manager |
| Nothing is listening on the remote port | xrdp is installed but not started, so the desktop has no way to reach your laptop | ss -tln ‘sport = :3389’ |
| The alias names a display manager that is absent | A display manager was removed without handing the alias over, so the boot transaction has nothing to start | readlink /etc/systemd/system/display-manager.service |
startx is the trap in older advice, because neither desktop metapackage installs it. The command fails with startx: not found until you add xinit yourself.
I checked that on the finished install, and both startx and the xinit package were absent.
A blank desktop with a right-click menu is not a failure when you chose the openbox route. That is what a window manager alone looks like, and the missing panel is a package you have not installed yet.
A second display manager that never takes over is the last state worth checking.
If you installed a second display manager and the login screen did not change, the first one still owns the alias. Only one unit can hold it at a time.
Removing the desktop cleanly
Purging the metapackage leaves the packages it pulled in behind, so purge and autoremove belong together. Removing packages with apt covers the difference between the two commands and when each one is the right tool.
sudo apt purge ubuntu-desktop-minimal
sudo apt autoremove
apt lists the whole dependency tree for removal on a clean machine, then autoremove clears the libraries that nothing else needs. Reversal costs two commands, which is the useful property of installing a desktop as a metapackage rather than reinstalling the host.
Once the session is up, the GNOME software store is the first place to look for desktop applications, and the wider set of Linux desktop environments is worth reading before you commit to one.
The next command worth running is systemctl get-default, on any machine where a graphical session is supposed to appear and does not.
FAQ
Can I install a GUI on Ubuntu Server?
Yes. The desktop is a set of packages from the archive the server already uses, and one apt install of ubuntu-desktop-minimal brings in the display server, the window manager, the display manager and the session.
Does Ubuntu Server have a GUI by default?
No. The server install ships a text console and no desktop packages. The target it boots to is graphical even on a headless machine, which is why the graphics stack can be one apt install away.
How do I access the Ubuntu Server GUI remotely?
Install xrdp, enable and start the service, then connect an RDP client to port 3389. The session runs as your Linux account, so you sign in with the same username and password you use over SSH.
Which desktop environment is lightest for a server?
xorg with openbox and a greeter is the smallest option at roughly 116 MB of download. Among the full desktops, ubuntu-desktop-minimal is the smallest at about 714 MB.
Does installing a desktop slow the server down?
It costs disk and memory. A greeter idles at a few megabytes, the session and its services grow once you log in, and every added package is one more thing to update each month.
Why is there no GUI after I installed ubuntu-desktop?
The desktop is installed and the greeter is running. A headless server has no display for that greeter to draw on, so the login screen only exists where a monitor or a remote session can see it.
