Intro:
If you just want to know how to setup UI and not about setting up VM, scroll to the section : Installing GUI. Let’s startttttttttttt……………..
Prerequisite:
- VMWare workstation 15 pro
- Download CentOS DVD from any mirror : https://www.centos.org/download/
To create new VM:
In VMware workstation click ‘File> Create VM’ and choose custom option.

Select ESXi 6.5 from dropdwon to ensure compatibility with previous versions.

Choose ‘ i will select OS later‘ to avoid the situation of VMWare detecting incorrect OS version and doing wrong configurations, that might cause compatibility issues.
Note: you can choose installer image directly, and in most cases it works fine.

Select the settings as in the screenshots below, and leave the settings in it’s defaults if screenshots are not provided.

Choose different location and name if required, else leave it as default.


Select appropriate RAM size for your VM, more RAM size = Smooth system!!!

Select NAT or Bridged for internet connection , use Host only for private network between VM and host.
Suggested: We need to install packages and hence requires internet connectivity. For this purpose, choose NAT.
Note: Bridge network will behave as a new device connected to the real network and so is not recommended in protected networks. Read more at : Here

Leave all other setting as default and click finish.

Go to VM setting and select the downloaded ISO file and reboot the system.

select install centos 7.

Press Enter.

Select Keyboard and other settings.

Click on ‘installation Destination’ (Or where ever such a mark is there ).

Don’t need to do anything, just click Done button on the top left corner.

Start installation.

Set root password and create password by clicking the respective icons.

login as root.

Installing GUI. Let’s startttttttttttt……………..
Set up network:
Open network management UI through below command:
nmtui
Note: use your arrow keys to select different buttons and options.
Go to Edit connection and choose your network, select ‘automatically connect’:
This will ensure that network connection is enabled automatically with every reboot

Click OK and choose ‘activate a connection’. Select the appropriate connection and click activate (if status shows as deactivate then leave it as it is ).

Give the below command to ensure proper dhcp IP (not mandatory, do only if system didn’t got an IP assigned):
sudo dhclient
Install GNOME Desktop UI:
First update all packages in the system to avoid conflicts:
sudo yum update
Give the below command to install GNOME Desktop UI theme.
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
Start UI:
Give the below command to start GNOME Desktop UI theme.
startx
Add to start up:
But these settings will go off once you reboot the system. You can start the UI each time by just running startx.
But still this would be hectic, the workaround would be to start GUI automatically on start up.
First use the command ‘startx’ and open the terminal
copy and paste the below command to add GNOME UI to start up ( as GUI allows copy – paste) .
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
Here what we actually does is that , we sets runlevel 5 (graphical) to default runlevel.
So on each reboot , system starts up using default runlevel 5 which is the graphical runlevel
The below command shows the available runlevels
ls –al /lib/systemd/system/runlevel*
Note: Just think of runlevels as instructions used by linux to know what all services or capabilities to be loaded during boot-up ( something like secure,full and minimum start up boot in windows) . RunLevel 5 have scripts running for GUI.
if sudo doesn’t work then add the user to the sudo file as :
su - usermod -aG wheel username