Ubuntu is one of the most widely used Linux distributions, developed by Canonical inc. Ubuntu comes in several flavors, the Ubuntu Desktop Edition, which ships with a GNOME-based desktop by default, and the Ubuntu Server edition, which is mainly meant to be run on headless servers. Ubuntu server edition does not install a GUI. This tutorial will show you how to install an Ubuntu 20.04 Desktop from the command line on an Ubuntu server system.

Prerequisites

  • Ubuntu 20.04 Server
  • User with root (sudo) privileges

Prepare the system

Before we start installing the Desktop GUI, we will update the package lists.

sudo apt update

How to Install Ubuntu Desktop from Ubuntu Server Desktop shell ubuntu

And then install any pending updates, if any.

sudo apt upgrade -y

How to Install Ubuntu Desktop from Ubuntu Server Desktop shell ubuntu

Install a display manager

In this step, we will install the display manager. I have chosen to use the LightDM display manager here as it uses fewer resources than the default display manager GDM3.

sudo apt install lightdm

How to Install Ubuntu Desktop from Ubuntu Server Desktop shell ubuntu

During installation, you will be asked which display manager shall be the default display manager. Choose ‘lightdm’ here.

How to Install Ubuntu Desktop from Ubuntu Server Desktop shell ubuntu

Install Ubuntu Desktop

In the final step, we will install the Ubuntu desktop environment using tasksel.

As the tasksel command might not be installed on your system yet, we’ll install that first.

apt install tasksel

How to Install Ubuntu Desktop from Ubuntu Server Desktop shell ubuntu

I will install the standard Ubuntu desktop here, if you prefer to install a different desktop like KDE Plasma, Mate Core, or Xubuntu, have a look at the next chapter. I’ll list the tasksel commands to install these alternative desktops there.Advertisement

Now install Ubuntu Desktop using tasksel:

sudo tasksel install ubuntu-desktop

The installation process of the Ubuntu Desktop starts immedeately.

How to Install Ubuntu Desktop from Ubuntu Server Desktop shell ubuntu

Reboot the system to start the Desktop GUI when the installation of the Ubuntu Desktop environment has finished.

sudo reboot

After reboot, you will be greeted with the Ubuntu Desktop login.

How to Install Ubuntu Desktop from Ubuntu Server Desktop shell ubuntu

Enter your password and you are logged into the desktop.

How to Install Ubuntu Desktop from Ubuntu Server Desktop shell ubuntu

Other Desktop environments

The apt and tasksel commands are also capable of installing other desktop environments, I’ll list the commands to install them below.

Installing KDE Plasma

sudo apt install kde-plasma-desktop

Installing Xubuntu

sudo tasksel install xubuntu-core

Installing Mate Core

sudo tasksel install ubuntu-mate-core