I have installed CentOS 7 but I forget to install GUI. How can I install GUI on already installed CentOS 7 ??
In this tutorial, you will learn how to install GUI on CentOS 7. Let’s assume you have installed CentOS 7 without GUI (Desktop environment) . No need to worry, still you can install desktop environment for your server. Just run the few commands with root user or sudo user priveleges.
So we have a only command line interface and it looks like dark black screen as shown in the below snapshot.
Firstly, we need to Run the command on the command line mode :
[root@localhost ~]# yum group list
Install the group package name “GNOME Desktop” “Graphical Administration Tool”
[root@localhost ~]# yum groupinstall "GNOME Desktop" "Graphical Administration Tool"
Next thing is to enable the GUI on startup. In CentOS 7 /etc/inittab/ file not used to change the run levels. Systemd uses the “targets” instead of run level. To set CentOS 7 boot directly into the GUI, run this command:
[root@localhost ~]# systemctl set-default graphical.target
You do not need to reboot server, just run following command to start or switch from command line to GUI:
[root@localhost ~]# systemctl start graphical.target
CentOS 7 GUI screen would be display as shown below in the snapshot.
Congratulations !!! You have successfully installed GUI (desktop environment) on CentOS 7.