Install GUI on Ubuntu Server 22.04 Jammy jellyfish
Ubuntu 22.04 LTS Jammy Jellyfish is due to release on April 21, 2022. However, users of Ubuntu 21.10 are able to upgrade to the latest release right now. There is also another option to Install Ubuntu 22.04 into a Virtual Machine by downloading the released ISO Image. In today’s article, we are gonna Install GUI on Ubuntu Server 22.04 Jammy Jellyfish
If you haven’t read the Previous Article (How to Install Ubuntu 22.04 Jammy Jellyfish using VMware Workstation) and have yet to install your Ubuntu 22.04 VM, it’s best to go through that article and come back.
Let’s jump right in and get the GUI running
INSTALLING A DISPLAY MANAGER
Step 1: Login

Login using the root user’s username and password
Step 2: Install LightDM
Now, you need to install a display manager to install GUI on Ubuntu Server 22.04, in this case, we are using LightDM
To do that, run either of these commands
sudo apt-get install tasksel
sudo apt install tasksel
Did you get any error [E: Unable to Fetch some archives]?
Step 3: Start LightDM
Once you have installed lightDM, you gotta start it. Use this command to do that
sudo systemctl start lightdm
INSTALL UBUNTU SERVER GUI
Step 4: Install Tasksel
Tasksel package provides a simple interface for users who want to configure their system to perform a specific task. This program is used during the installation process, but you can also use tasksel at any time.
You can use any of these commands for that
sudo apt-get install tasksel
sudo apt install tasksel
Did you get any error [E: dpkg was interrupted]?
Step 5: Install the Desktop Environment
You can install the desktop environment by simply running Tasksel
tasksel

Hit Space and select Ubuntu Desktop
Then, hit Tab and click OK
Did you get any error [Permission denied tasksel: debconf failed to run]?

The installation has started, this might take a while
Did you get any error [tasksel: apt-get failed (100)]?
Step 6: Reboot
Once your installation is complete, just reboot
sudo reboot
And then, ta-daa!

Errors when you Install GUI on Ubuntu Server:
I have listed some of the Errors you might have encountered while installing the GUI and their Solutions. Hope it helps.
E: dpkg was interrupted
This error happens while installing tasksel. Run the below code to move on.

sudo dpkg --configure -a
sudo apt-get install tasksel
E: Unable to Fetch some archives
This error happens while installing Lightdm. Be sure to run the following code to Fix it.

sudo apt-get update
sudo apt-get install lightdm
Permission denied tasksel: debconf failed to run
You might get this error while running tasksel. The solution is to run it as sudo tasksel

sudo tasksel
Tasksel: apt-get failed (100):
You might get this while selecting Ubuntu Desktop in tasksel. We have 2 Solutions for this. You can run any 1 of the listed codes to continue the installation.
sudo apt-get update
or
sudo dpkg --configure -a
I was pretty pleased to discover this great site. I need to to thank you for your time for this particularly fantastic read!! I definitely appreciated every part of it and I have you book marked to see new stuff on your blog.