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.
- Login to CentOS with the root user in the command line.
- Run below yum command to install the GNOME desktop, this may take some time.
# yum groupinstall "GNOME Desktop" "Graphical Administration Tools" -y
- Install X Window System.
# yum groupinstall "X Window System" "Desktop" -y
- Start the GNOME GUI interface by run command startx.
- 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.
- Login to CentOS use GUI interface.
- Click Applications —> System Tools —> Settings menu item.
- In the Settings window, click Devices —> Resolution to change the screen resolution.
- 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?
- I have a VPS server that is running CentOS, the CentOS is version 7.
- I install the Gnome desktop in it to manage the server through GUI.
- But I find the Gnome desktop cost so much memory and CPU because my VPS has fewer resources.
- So I need to stop the CentOS Gnome desktop and manage it from the command line always.
- 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.
- You can follow the below steps to archive it.
- Run the command service gdm status or systemctl status gdm to check whether the GDM service is running or not.
- If the GDM service is not running, you can run the command service gdm start or systemctl start gdm to start it.
- If you want to stop it you can run the command service gdm stop or systemctl stop gdm to stop it.
- You can run the command ps aux | grep gnome to check whether the above command success or not.