If you have performend a RHEL 7 Linux Server installation and did not include Graphical User Interface (GUI) you can do it later directly from command line using yum
command and selecting an appropriate installation group. To list all available installation groups on Redhat 7 Linux use:
[[email protected] ~]# yum group list Loaded plugins: product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Available environment groups: Minimal Install Infrastructure Server File and Print Server Basic Web Server Virtualization Host Server with GUI Available Groups: Compatibility Libraries Console Internet Tools Development Tools Graphical Administration Tools Legacy UNIX Compatibility Scientific Support Security Tools Smart Card Support System Administration Tools System Management Done
From the above list select Server with GUI
installation group:
[[email protected] ~]# yum groupinstall 'Server with GUI' Transaction Summary ================= Install 261 Packages (+604 Dependent packages) Total download size: 527 M Installed size: 1.7 G Is this ok [y/d/N]:
Just because gnome desktop environment is a default GUI on RHEL 7 linux system the above command will install gnome. Alternatively, you can run the below command to only install core GNOME packages:
[[email protected] ~]# yum groupinstall 'X Window System' 'GNOME'
Once the installation is finished, you need to change system’s runlevel to runlevel 5. Changing runlevel on RHEL 7 is done by use of systemctl
command. The below command will change runlevel from runlevel 3 to runelevel 5 on RHEL 7:
[[email protected] ~]# systemctl set-default graphical.target
Depending on your previous installations you may need to accept Redhat License after you reboot your system. Once you boot to your system you can check GNOME version using:
[[email protected] ~]# gnome-shell --version GNOME Shell 3.8.4
On RHEL 6
-
If you are not already root, switch users to the
root
account:su -
Provide the administrator password when prompted. -
If you have not already done so, install the X Window System and a graphical desktop environment. For example, to install the GNOME desktop environment, use this command:
yum groupinstall "X Window System" Desktop
To install the KDE desktop environment, use:yum groupinstall "X Window System" "KDE Desktop"
This step may take some time as your Red Hat Enterprise Linux system downloads and installs additional software. You may be asked to provide the installation media depending on your original installation source. -
Run the following command to edit the
/etc/inittab
file:vi /etc/inittab
-
Press the I key to enter
insert
mode. -
Find the line that includes the text
initdefault
. Change the numeral3
to5
. -
Type
:wq
and press the Enter key to save the file and exit the vi text editor.
reboot
command. Your system will restart and present a graphical login.