How To Enable GUI Mode In CentOS 7

After installing CentOS, when you start it, it will give you a command-line interface, this is not user-friendly. This article will tell you how to install GUI desktop software GNOME in CentOS and boot CentOS with GUI desktop.

1. Install GNOME Desktop.

  1. Login to CentOS with the root user in the command line.
  2. Run below yum command to install the GNOME desktop, this may take some time.
    # yum groupinstall "GNOME Desktop" "Graphical Administration Tools" -y
  3. Install X Window System.
    # yum groupinstall "X Window System" "Desktop" -y
  4. Start the GNOME GUI interface by run command startx.
    # startx
  5. Run the below command to reserve the GUI interface for each time you start CentOS.
    systemctl set-default graphical.target

2. How To Change CentOS Screen Resolution.

  1. Login to CentOS use GUI interface.
  2. Click Applications —> System Tools —> Settings menu item.
  3. In the Settings window, click Devices —> Resolution to change the screen resolution.
  4. If you start one software, you should see it at bottom of the screen. If you can not see it, then the screen resolution is not correct.

3. How To Start / Stop CentOS Gnome Desktop By Command-Line?

3.1 Question(2022/05/15).

  1. I have a VPS server that is running CentOS, the CentOS is version 7.
  2. I install the Gnome desktop in it to manage the server through GUI.
  3. But I find the Gnome desktop cost so much memory and CPU because my VPS has fewer resources.
  4. So I need to stop the CentOS Gnome desktop and manage it from the command line always.
  5. So I want to know how to start/stop Gnome desktop GUI from the command line in CentOS, so that I can turn it on / off when I need it. Thanks.

3.2 Answer1.

  1. You can follow the below steps to archive it.
  2. Run the command service gdm status or systemctl status gdm to check whether the GDM service is running or not.
  3. If the GDM service is not running, you can run the command service gdm start or systemctl start gdm to start it.
  4. If you want to stop it you can run the command service gdm stop or systemctl stop gdm to stop it.
  5. You can run the command ps aux | grep gnome to check whether the above command success or not.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.