Tutorial: Install the GNOME desktop environment
The GNOME desktop environmentDesktop package group installs
GNOME along with its supporting components.
In this tutorial, you install the GNOME desktop environment on your AL2027 instance so you can use a graphical interface instead of the command line. This is useful for workloads such as data visualization, computer-aided design (CAD), or scientific applications.
This tutorial takes approximately 15–20 minutes to complete.
Note
Completing this tutorial requires a running Amazon EC2 instance, which might result in
charges to your Amazon account for the instance, Amazon Elastic Block Store (Amazon EBS) storage, and associated resources.
For pricing details, see Amazon EC2
pricing
Topics
Prerequisites
Before you install the desktop environment, make sure your instance meets the following requirements.
Memory (RAM)
The GNOME desktop environment requires at least 2 GB of
memory to start, and 4 GB or more is
recommended for comfortable interactive use. Choose an instance type
with sufficient memory, such as t3.medium (4 GB) or larger. Smaller
types like t3.nano, t3.micro, and t3.small do
not have enough memory for a responsive desktop.
Base system
This tutorial assumes that you have already launched an instance running a current release of AL2027 and that the system is up to date. For more information, see the AL2027 on Amazon EC2 and Updating AL2027 pages. Update your packages before installing the desktop so that dependencies resolve against the latest versions:
sudo dnf update -y
Step 1: Install the GNOME desktop environment
-
Install the GNOME desktop environment and related packages.
sudo dnf groupinstall "Desktop" -yYou can confirm what the group contains at any time with:
dnf group info "Desktop" -
(Optional) Verify that the group is installed.
dnf group list --installed
Note
To access the graphical desktop environment, you need to install and configure additional software such as Amazon DCV or VNC. These tools allow you to connect to and interact with the graphical user interface over the network.
Step 2: Start the desktop
The Desktop group installs the GDM
display manager but does not start it automatically. Enable and start it so the
graphical login is available now and on every boot:
sudo systemctl enable --now gdm
To make the system boot into the graphical interface by default:
sudo systemctl set-default graphical.target
You can verify the service and default target with:
systemctl is-active gdmsystemctl get-default
Step 3: Clean up resources
To avoid ongoing charges, clean up the resources you created for this tutorial when you are finished with them.
-
If you no longer need the instance, stop or terminate it. Stopping the instance ends compute charges but retains the Amazon EBS volume; terminating it removes the instance and its associated resources. For more information, see the AL2027 on Amazon EC2 page.
-
If you want to keep the instance but no longer need the graphical desktop, stop the graphical login and prevent it from starting on boot.
sudo systemctl disable --now gdm -
Restore the default boot target to the multiuser (non-graphical) target.
sudo systemctl set-default multi-user.target -
(Optional) Uninstall the desktop packages.
sudo dnf groupremove "Desktop" -y
Related topics
For more information about the graphical desktop environment, see the following documentation:
-
What Is Amazon DCV? in the Amazon DCV Administrator Guide