How to Install a Desktop EnvironmentGUI in Ubuntu Server

If you’ve installed Ubuntu Server for the first time, you’ll want a familiar user interface, probably similar to Ubuntu Desktop. Here’s how to set up a graphical user interface and install a desktop environment on your Ubuntu Server.

Why would you need a GUI on Ubuntu Server?

Generally, server machines do not use a graphical user interface (GUI), and the command-line interface (CLI) is the preferred solution for day-to-day operations. It is also recommended that you avoid installing GUIs on production servers to better manage resources and ensure maximum performance.

However, if you’ve installed Ubuntu Server only for personal use, perhaps on a spare laptop to stream media, then it’s perfectly fine to install a GUI on your Ubuntu Server machine as long as the performance is massive. Do not be an obstacle.

Using a GUI helps a lot when dealing with video or audio streaming as you get an easy-to-understand visual understanding of the on-screen elements.

Step 1: Update and upgrade your system

This is a fundamental step before making any changes or installing packages on your Ubuntu Server. Update Ubuntu’s software repositories and upgrade your system with apt package manager.

Finalize the update and upgrade, then proceed to the next step to install the GUI on Ubuntu Server.

Step 2: Install a Desktop Environment on Ubuntu Server

There are a variety of desktop environments to choose from, but if your hardware can afford it, let’s go ahead with the GNOME desktop environment, which is the default desktop for Ubuntu Systems. You are always free to choose from other options, but this freedom comes at the risk of some software incompatibilities.

To install GNOME as a GUI on your Ubuntu Server, use the APT package manager to download and install the package.

Not sure which desktop environment to choose? Get started with this list of the best Linux desktop environments.

Step 3: Install and set up Display Manager on Ubuntu Server

After you install the desktop environment, you must install a display manager to manage users and load desktop environment sessions.

Since you’re working with Ubuntu Server, it’s best to opt for lightweight solutions that are easy on resources. In this case, consider installing and using LightDM, a fast, lightweight, and cross-desktop display manager.

Installing LightDM on Ubuntu Server

During the installation process, you will be asked to choose between GDM3 (GNOME’s default display manager) and LightDM.

Select LightDM using the Spacebar and highlight <OK> using the Tab key. Finalize your choice and press Enter to set LightDM as the default display manager.

Setting up LightDM on Ubuntu Server

Now that the installation process is complete, you need to enable the LightDM service. You can use either the service command or the systemctl command to do this.

Reboot your system with reboot command. The next time your system boots, you should be greeted by the LightDM greeter and GUI on your Ubuntu Server session upon successful login.

If you want to try alternatives to LightDM, here is a guide on how to uninstall and remove LightDM.

How to remove GUI from Ubuntu Server

Reverting back to the CLI experience requires only a few commands and a system reboot. Using the APT package manager, remove all previously installed packages.

Remember to change the desktop package name in the first command if you have installed some other desktop environment.

Reboot your system and the changes should take effect.

Best Linux Server Distributions to Choose From

Ubuntu Server is arguably the most popular server distribution out there today. However, there are always alternatives to choose from in the open-source world.

If the Ubuntu experience is getting old for you, consider migrating to an alternative server operating system.

Leave a Comment