Install a GNOME or KDE Plasma Desktop (GUI) on Ubuntu 26.04 Server
Add a GNOME or KDE Plasma desktop to an Ubuntu 26.04 server, choose between minimal and full package sets, boot into it and remove it again if needed.
Ubuntu Server installs without a graphical interface. This guide adds a GNOME or KDE Plasma desktop to Ubuntu 26.04 LTS, shows how to boot into it, how to return to text mode and how to remove it again. The same package names work on Ubuntu 24.04 LTS. A short section at the end covers AlmaLinux 9 and Rocky Linux 9, which replace CentOS.
Before you start
- A desktop adds several gigabytes of packages and a few hundred megabytes of idle memory use. Plan for at least 4 GB of RAM and 25 GB of disk; a 1 GB server will struggle.
- You need a user with
sudorights. Graphical login asrootis disabled, so create a normal user first if you only have root:sudo adduser deployandsudo usermod -aG sudo deploy. - On a VPS there is no monitor. You will see the desktop through your provider's web console, or through a remote-desktop service that you set up afterwards.
Update the system first:
sudo apt update
sudo apt full-upgrade -yChoose a desktop package
Each desktop is installed through a metapackage that pulls in everything else.
| Package | What you get |
|---|---|
ubuntu-desktop-minimal | GNOME as shipped by Ubuntu with a small set of applications and the GDM login manager |
ubuntu-desktop | The same desktop plus the full default application selection |
kde-plasma-desktop | KDE Plasma with a minimal set of KDE applications |
kubuntu-desktop | The complete Kubuntu experience: Plasma, the SDDM login manager, Kubuntu settings and its default applications |
For a server, the minimal variants are usually the right choice.
Install GNOME
sudo apt install -y ubuntu-desktop-minimalFor the full set of applications, install ubuntu-desktop instead. Both bring GDM as the login manager.
Install KDE Plasma
The lean option installs Plasma and the SDDM login manager explicitly, because SDDM is only a recommended package of kde-plasma-desktop:
sudo apt install -y kde-plasma-desktop sddmFor the full Kubuntu desktop:
sudo apt install -y kubuntu-desktopThe KDE packages live in the universe component, which is enabled by default on Ubuntu Server. Ubuntu 26.04 ships Plasma 6; Ubuntu 24.04 ships Plasma 5.27 under the same package names.
If you install both desktops, the installer asks which display manager to use (gdm3 or sddm). Either one can start both desktops; you pick the session on the login screen. To change the choice later:
sudo dpkg-reconfigure gdm3Boot into the graphical interface
Make the graphical target the default and reboot:
sudo systemctl set-default graphical.target
sudo rebootAfter the reboot, open your provider's web console. You should see the login screen; sign in with your normal user.
To start the desktop once without changing the default, use:
sudo systemctl isolate graphical.targetVerify
systemctl get-default
systemctl status display-managerThe first command should print graphical.target, the second should show gdm or sddm as active.
Switch back to text mode
You can keep the desktop installed but stop it from starting at boot, which frees its memory until you need it:
sudo systemctl set-default multi-user.target
sudo rebootRemove the desktop
Removing the metapackage alone leaves its dependencies behind. Purge it and then let apt remove what is no longer needed. Review the list apt prints before you confirm.
sudo systemctl set-default multi-user.target
sudo apt purge ubuntu-desktop ubuntu-desktop-minimal gdm3
sudo apt autoremove --purgeFor KDE Plasma:
sudo apt purge kubuntu-desktop kde-plasma-desktop sddm
sudo apt autoremove --purgeThings to watch on a server
- Networking: desktop installs add NetworkManager. Your existing netplan configuration keeps working; do not switch the netplan renderer on a remote machine unless you have console access to fix it.
- Sleep: a desktop may try to suspend an idle machine. On a server, prevent that with
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target. - Firewall: a desktop does not need any inbound port. Only open one if you add a remote-desktop service, and prefer tunnelling it over SSH.
- Updates: the desktop packages are updated with the rest of the system by
apt; there is nothing extra to maintain.
AlmaLinux 9 and Rocky Linux 9
CentOS 6, 7 and 8 are all end-of-life; AlmaLinux 9, Rocky Linux 9 and CentOS Stream 9 are the current members of that family, and editing /etc/inittab no longer has any effect there. GNOME is the only desktop in their standard repositories and is installed as a package group:
sudo dnf group install -y "Server with GUI"
sudo systemctl set-default graphical.target
sudo rebootKDE Plasma is not part of the base repositories of the RHEL 9 family; it is provided through the community EPEL repository.
Frequently asked questions
Can I use the desktop over SSH without a web console?
Not directly. SSH can forward single X11 applications with ssh -X, but for a whole desktop you need a remote-desktop service such as RDP or VNC running on the server, ideally reached through an SSH tunnel.
Does installing a desktop turn Ubuntu Server into Ubuntu Desktop?
Largely, yes. Both editions use the same archive, so after installing ubuntu-desktop the package set is close to a desktop install. The server kernel, your existing services and your netplan configuration stay as they were.
Which desktop uses fewer resources?
GNOME and Plasma are both full desktops with similar needs. If memory is tight, a lighter environment such as Xfce (xubuntu-desktop-minimal) or LXQt is a better fit for a small server.
Do I need the GUI to manage a server?
No. Everything can be done over SSH, and web-based tools such as Cockpit give you a graphical overview without a desktop environment running on the machine.