Ubuntu is one of the most popular Linux distributions. It is easy to use, easy to install and includes everything that anyone needed. Ubuntu officially released in three editions: desktop, server, and core for IoT and robots.
Ubuntu server by default doesn’t include a desktop environment that means you have to manage everything from the terminal. A few things on a system can be managed better using GUI.
This article explains how you can set up a graphical user interface on an Ubuntu server.
To complete this installation guide you will need to have the following.
- A system running Ubuntu server (I will use Ubuntu 20.04 server)
- Access to a user account with superuser privileges
- You need to have a good internet connection to download packages for GUI.
Install tasksel utility
Tasksel utitlity provides a terminal-based menu that includes a number of grouped packages like Ubuntu desktop, LAMP, DNS server, etc. You can quickly set up a server with these packages using this utility. This doesn’t come preinstalled on a system you need to use the given command to install it.
First, use the given command to update the local package database on your system –
sudo apt update && sudo apt upgrade -y
Now use the given command to install tasksel –
sudo apt install tasksel
If asked for your confirmation press y and then enter.
Install a display manager
A display manager is an application that starts the desktop window, manages user authentication. There are different display managers available you can choose among LightDM, SDDM, SLiM, GDM3, etc. GDM3 is a resource-intensive display manager while others require fewer resources.
Now choose a display manager and install it using one of the given commands-
To install GDM3 use –
sudo apt install gdm3
OR install LightDM using –
sudo apt install lightdm
OR you can install SLiM using –
sudo apt install slim
Choose a desktop environment for your server
Next, run the tasksel utility and choose the desktop environment that you want to set up on your server.
In the tasksel interface, you can choose among one of the given.
ubuntu-desktop – This will install Ubuntu’s default desktop environment (GNOME desktop)
ubuntu-desktop-minimal – Use to install Ubuntu’s desktop minimally (GNOME desktop)
kubuntu-desktop – Use to setup Kubuntu’s official desktop environment (default KDE desktop)
lubuntu-desktop – This will setup Lubuntu’s default desktop ( LXQt desktop )
xubuntu-desktop – Use to setup Xubunt’s default desktop (Xfce)
ubuntu-budgie-desktop – Use to install Budgie desktop
ubuntustudio-desktop – Installs Ubuntu studio’s default desktop ( Xfce based desktop)
ubuntusudio-desktop-core– Installs Ubuntu studio’s default desktop minimally ( Xfce based desktop)
ubuntu-mate-desktop – Ubuntu mate’s default desktop (MATE desktop )
You can see more tasks by using the given command.
How to install a desktop environment on an Ubuntu server
After choosing a desktop environment, for example, Ubuntu’s GNOME desktop use the following command in your terminal –
sudo tasksel install ubuntu-desktop
This will start the downloading and installation process.
OR first, run the tasksel utility by using –
In the tasksel interface choose a desktop to install on your server. You can select an option by using the Space key press Tab to select ok. Here I will install GNOME desktop which is ubuntu’s default desktop environment on your system.
Once it gets done reboot your system. You should see Ubuntu’s login Window.
If your system doesn’t get started in GUI mode make sure your system boot into the graphical target. To make your system boot into graphical target use the given command.
sudo systemctl set-default graphical.target
Similarly, you can install any other desktop environment if you want. Now if you have a query then write us in the comments below.