In this post going to see How to install Graphical user Interface/GUI on RedHat Linux.
We have 7 run levels in RedHat and in that, runlevel 5 is used for GUI.
Use below command to change from current runlevel to GUI(before changing to graphical mode, make sure GNOME package installed):
[root@server ~]# init 5
To set GUI as default runlevel, use the below command and reboot the machine.
[root@server ~]# systemctl set-default graphical.target
If without any error runlevel switched to GUI, than package is already installed in your machine.
If you are receiving any error, than you should install the GNOME package.
Let’s see how to install the GUI in RedHat 7.
We will use yum package manager to install the GUI.
We have two types of repository that, one is online and another one is local repository.First decide which repository going to use to install GNOME package.
If you’re machine connected with internet, register in redhat repository using below command.
[root@server ~]# subscription-manager register [root@server ~]# subscription-manager refresh [root@server ~]# subscription-manager attach --auto
To use local repository make sure its already configured in your machine. Click here to know how to configure local yum repository.
Use the below command to check the group name for GNOME installation.
[root@server ~]# yum grouplist Loaded plugins: product-id, search-disabled-repos, subscription-manager This system is not registered to Red Hat Subscription Management. You can use su bscription-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
We should install “Server with GUI” using yum like below.
[root@server ~]# yum -y groupinstall "Server with GUI"
Now successfully installed GUI in our machine. Try to switch using “init 5” command.
Thanks for reading this post.
Reference: Red Hat Discussion