Viewing the Default Target
To determine which target unit is used by default, run the following command:
systemctl get-default
Viewing the Current Target
To list all currently loaded target units, type the following command at a shell prompt:
systemctl list-units --type target
By default, the systemctl list-units
command displays only active units. If you want to list all loaded units regardless of their state, run this command with the --all
or -a
command line option:
systemctl list-units --type target --all
Changing the Default Target
To configure the system to use a different target unit by default, type the following at a shell prompt as root
:
systemctl set-default name.target
Changing the Current Target
To change to a different target unit in the current session, type the following at a shell prompt as root
:
systemctl isolate name.target
From the above list select Server with GUI
installation group:
[root@rhel7 ~]# yum groupinstall 'Server with GUI'Transaction Summary=================Install 261 Packages (+604 Dependent packages)Total download size: 527 MInstalled size: 1.7 GIs this ok [y/d/N]:
Just because gnome desktop environment is a default GUI on RHEL 7 linux system the above command will install gnome. Alternatively, you can run the below command to only install core GNOME packages:
[root@rhel7 ~]# yum groupinstall 'X Window System' 'GNOME'
Once the installation is finished, you need to change system's runlevel to runlevel 5. Changing runlevel on RHEL 7 is done by use ofsystemctl
command. The below command will change runlevel from runlevel 3 to runelevel 5 on RHEL 7:
[root@rhel7 ~]# systemctl enable graphical.target --force
Depending on your previous installations you may need to accept Redhat License after you reboot your system. Once you boot to your system you can check GNOME version using:
[root@rhel7 ~]# gnome-shell --versionGNOME Shell 3.8.4