Software >> OS >> Unix >> Linux >> RHEL >> How to switch from text login to graphical (desktop) login

[RHEL 6.x]

# 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 numeral 3 to 5.
Type :wq and press the Enter key to save the file and exit the vi text editor.

[RHEL 7.x]


# yum group list

# yum groupinstall "Server with GUI"

# systemctl get-default

# systemctl set-default

reboot the server.