This guide walks you through installing a graphical user interface (GUI) on Ubuntu Server or a minimal Ubuntu install. You’ll learn how to choose a desktop environment, install it with a single command, and get to a login screen. The steps work for recent LTS versions (20.04 and newer) and require only a terminal and sudo access.
What You’ll Need
- A running Ubuntu system (Server edition or minimal install) with internet access.
- Root or sudo privileges to install packages.
- At least 5 GB of free disk space (more for heavier desktops like GNOME).
- At least 1 GB of RAM (2 GB recommended for smooth use).
Step-by-Step
- Update your system. Open a terminal and run:
sudo apt update && sudo apt upgrade -y
This ensures all existing packages are current, which avoids dependency conflicts during the GUI install. - Choose a desktop environment. The most common options are:
- GNOME – default for Ubuntu Desktop, modern and full-featured. Install with
sudo apt install ubuntu-desktop(this pulls in many packages, so it takes time). - KDE Plasma – highly customizable, lighter than GNOME. Install with
sudo apt install kubuntu-desktop. - Xfce – lightweight, great for older hardware. Install with
sudo apt install xubuntu-desktop. - LXQt – very lightweight, minimal. Install with
sudo apt install lubuntu-desktop.
For this guide, we’ll use
ubuntu-desktopas the example; the steps are identical for others. - GNOME – default for Ubuntu Desktop, modern and full-featured. Install with
- Install the desktop environment. Run:
sudo apt install ubuntu-desktop
AnswerYwhen prompted. The installer will download and configure hundreds of packages. This can take 10–30 minutes depending on your connection. - Install a display manager (if not included). Most desktop metapackages include one (like GDM for GNOME). If you chose a minimal install or a custom desktop, you may need to install one explicitly:
sudo apt install gdm3
During installation, you’ll be asked to choose a display manager – selectgdm3(or your preferred one). - Reboot the system. After installation completes, restart:
sudo reboot
If all went well, you’ll see the graphical login screen instead of the text console. - Log in and verify. Enter your username and password. You should land on the desktop. If you don’t see the GUI, continue to the Troubleshooting section below.
Common Mistakes
- Not updating first. Skipping
sudo apt updatecan lead to missing dependencies or conflicts with old package versions. - Installing multiple desktops. While possible, mixing GNOME and KDE can cause menu duplication and theme conflicts. Stick to one unless you know what you’re doing.
- Ignoring disk space. GNOME needs several GB. If you’re low, use a lightweight option like Xfce or LXQt.
- Forgetting to reboot. Some services won’t start until a restart, so always reboot after installation.
- Choosing the wrong display manager. If you install a desktop that doesn’t include one, you’ll be stuck at a black screen after reboot. Always ensure a display manager is present.
Tips
- For a minimal but usable GUI, consider
sudo apt install xfce4instead of the fullxubuntu-desktop– it’s lighter and installs fewer packages. - Use
taskselif you want a menu-driven selection:sudo apt install tasksel && sudo tasksel. This lets you pick from a list of desktops. - If you’re on a headless server, you can still install a GUI and access it via a VNC server (like TigerVNC) – but that’s beyond this guide.
- After installation, you can switch between console and GUI with
Ctrl+Alt+F1(console) andCtrl+Alt+F2(GUI) if you ever need to troubleshoot.
Troubleshooting
- Black screen after reboot. This usually means the display manager didn’t start. Press
Ctrl+Alt+F1to get a terminal, log in, and check the status:systemctl status gdm3(or your display manager). If it’s not running, start it withsudo systemctl start gdm3. If it fails, check logs withjournalctl -u gdm3. - GUI doesn’t appear, but no errors. Sometimes the default target isn’t set to graphical. Run
sudo systemctl set-default graphical.targetand reboot. - Login loop (you enter password, screen flashes, returns to login). This often points to a corrupted user profile or a graphics driver issue. Try logging in as another user, or reinstall the desktop:
sudo apt install --reinstall ubuntu-desktop. For driver issues, install recommended drivers viasudo ubuntu-drivers autoinstall. - Package errors during install. Run
sudo apt --fix-broken installto resolve dependency issues, then retry. - Slow performance. If the GUI is sluggish, consider a lighter desktop. You can install Xfce alongside GNOME and choose it at login.
Frequently Asked Questions
Can I install a GUI on Ubuntu Server?
Yes, the steps are exactly the same. Ubuntu Server doesn’t include a GUI by default, but you can install any desktop environment as described.
Which GUI is best for an old computer?
Xfce or LXQt are the most lightweight. They use less RAM and CPU, making them ideal for hardware with 2 GB RAM or less.
Will installing a GUI slow down my server?
It will consume more RAM and CPU, especially if the desktop runs in the background. For a production server, it’s better to keep it headless or use a lightweight GUI only when needed.
Can I remove the GUI later?
Yes, you can remove the desktop metapackage: sudo apt purge ubuntu-desktop and then sudo apt autoremove. This will remove most GUI packages, but be careful – it may also remove packages you want.
Do I need a display manager?
Yes, a display manager (like GDM, SDDM, or LightDM) is what shows the login screen and starts the graphical session. Most desktop metapackages install one automatically.
What if I want to use a different display manager?
You can install one and choose it during installation, or switch later with sudo dpkg-reconfigure gdm3 (replace gdm3 with your choice).
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Custom Alphanumeric Passcode iPhone: How to Set
- HomePod Software Update: How to Install
- How to Shuffle Photos in Slideshow on iPhone
- Quick Look Not Working on Mac? Fixes That Work
- How to See Deleted WhatsApp Messages on iPhone
- QUIC Protocol Error in Windows 10: Fixes