This tutorial is for you if you are planning to shift to GUI mode in Rocky Linux 8 from a command line mode. You won’t get any GUI interface If you have chosen the installation type as a minimal server during the time of the installation of Rocky Linux 8.
There is an easy way to get a GUI mode with the help of GNOME desktop packages.
How To Install GNOME GUI On Rocky Linux 8
At first, we need to list down the available package groups for Rocky Linux 8.
dnf group list
You will see the output something like below:
Available Environment Groups: Server with GUI Server Workstation Virtualization Host Custom Operating System Installed Environment Groups: Minimal Install Available Groups: Container Management .NET Core Development RPM Development Tools Development Tools Graphical Administration Tools Headless Management Legacy UNIX Compatibility Network Servers Scientific Support .......
Now, you can see the package “server with GUI” in the above list. You need to install Gnome GUI using the DNF command in Rocky Linux.
dnf groupinstall "Server with GUI" -y
Output:
Transaction Summary ======================================================================================================================================================================== Install 990 Packages Total download size: 872 M Installed size: 2.5 G Downloading Packages: (1/990): PackageKit-command-not-found-1.1.12-6.el8.x86_64.rpm 5.8 kB/s | 26 kB 00:04 (2/990): PackageKit-glib-1.1.12-6.el8.x86_64.rpm 139 kB/s | 139 kB 00:00 (3/990): PackageKit-1.1.12-6.el8.x86_64.rpm 106 kB/s | 598 kB 00:05 . . . . . . yelp-2:3.28.1-3.el8.x86_64 yelp-libs-2:3.28.1-3.el8.x86_64 yelp-tools-3.28.0-3.el8.noarch yelp-xsl-3.28.0-2.el8.noarch zenity-3.28.1-1.el8.x86_64 zip-3.0-23.el8.x86_64 Complete!
Now, run the following command to enable the GUI as the default run-level so that the Rocky Linux will boot into graphical mode at the time of startup.
systemctl set-default graphical
Output:
Removed /etc/systemd/system/default.target. Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.
Now, you need to restart your Rocky Linux and start using it in GUI mode.