How to Start CentOS GUI From the Command Line

Techwalla may earn compensation through affiliate links in this story.

CentOS is a robust Linux distribution used primarily in Web server environments. CentOS provides a stable server platform and is available as a free, open-source operating system for use by hosting providers and end users alike. While CentOS is a powerful Web server OS with many Internet related features, it lacks a graphical user interface with basic installations. Consequently, if you want enable a GUI from the CentOS command line, you'll need to first download and install a compatible graphical desktop environment, such as Gnome or KDE.


Step 1

Log in to the CentOS operating system.

Video of the Day

Step 2

Type the command "su -" to switch to a root session.

Step 3

Type the command:


yum groupinstall "X Windows System" "GNOME Desktop Environment" or yum groupinstall "X Windows System" "KDE Desktop Environment"

to install your preferred desktop environment.

Step 4

Type the command "startx" to start the X windows system and your preferred desktop environment.


If you already have a graphical desktop environment installed, you can just type "startx" as the root user.


references & resources