When CentOS/RHEL is installed it takes minimal installation as default or Sometimes it happened that you have a minimal installation and you need a graphical interface or need to upgrade a command line mode to graphical mode for learning/deploying something on CentOS or RHEL server.
Here In this Tutorial, we will Learn To Install Graphical User Interface (GUI) on A Minimal Installation on CentOS/RHEL 6/7.
- My Server IP is 192.168.1.188
- OS – CentOS/RHEL 6/7
Step 1: Install Gnome GUI
Run the following command to install GUI
For CentOS 7:
# yum group install "GNOME Desktop" "Graphical Administration Tools"
For RHEL 7:
# yum groupinstall "Server with GUI"
For RHEL/CentOS 6:
Here are few option so do as per your Requirement
# yum -y groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts"
You can also install the following optional GUI packages.
# yum -y groupinstall "Graphical Administration Tools" # yum -y groupinstall "Internet Browser" # yum -y groupinstall "General Purpose Desktop" # yum -y groupinstall "Office Suite and Productivity" # yum -y groupinstall "Graphics Creation Tools"
If you also want to add the K Desktop Environment (KDE) then use the following command
# yum -y groupinstall kde-desktop
Note: You can also find optional GUI packages for Centos 6/7 using the following command
# yum group list Output: Loaded plugins: fastestmirror There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Loading mirror speeds from cached hostfile Available Environment Groups: Minimal Install Compute Node Infrastructure Server File and Print Server Basic Web Server Virtualization Host Server with GUI GNOME Desktop KDE Plasma Workspaces Development and Creative Workstation 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
Step 2: Make GUI Default Mode For Every Reboot
With the upgrade of Centos/RHEL 7 from CentOS/RHEL 6 concept of runlevel has been changed to systemd so run following command
For RHEL/CentOS 7:
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
For RHEL/CentOS 6:
vim /etc/inittab #id:3:initdefault: id:5:initdefault: save and quit :wq!
Step 3: Reboot the Server
Step 4: License Agreement
After reboot, you will be prompted for accepting the license. Please follow below steps
Accept the license by clicking on the “LICENSE INFORMATION“.
Tick the “I accept the license agreement”
complete the setup by finishing up
You may be required to create a first user (local account), language, etc.
Then finally you will get the desktop.
NOTE: If You Got Stuck On This Screen Then Follow This Image
Few Short Cut Commands
GUI to CLI: Ctrl + Alt + F6
CLI to GUI: Ctrl + Alt + F1