To install the Gnome desktop environment on CentOS/RHEL 7 using the yum package manager, you can use the following command:

sudo yum groupinstall "GNOME Desktop"

This will install the Gnome desktop environment, as well as a number of related packages and dependencies.

Once the installation is complete, you can log out and select the Gnome desktop from the login screen.

You can also install only gnome-core package which is minimal package required for gnome to run

sudo yum install gnome-core

and then use the command

startx

to start the gnome desktop session

Please note that this command may take a while to complete as it will download and install a lot of packages. Also it is recommended to have internet connection.

 

In CentOS 7 and Red Hat Enterprise Linux (RHEL) 7, the default runlevel is set to multi-user text mode, which means the system will boot to the command line interface (CLI) rather than the graphical user interface (GUI). To set the system to boot directly into the GUI, you will need to change the default runlevel.

Here are the steps to change the default runlevel to GUI mode:

  1. Log in to the system as the root user.

  2. Open the /etc/inittab file in a text editor, such as nano or vi.

vi /etc/inittab
  1. Find the following line:
id:3:initdefault:
  1. Change the number 3 to number 5, so the line looks like this:
id:5:initdefault:
  1. Save the file and exit the text editor.

  2. Restart the system to apply the changes.

shutdown -r now

After the system restarts, it will boot into the GUI by default.

Please note that your GUI should be installed and configured properly before changing the default runlevel.

Also you can use the command

systemctl set-default graphical.target

to set the system to boot into GUI by default.

 

 

Previous Post Next Post