CentOS: Enable CentOS GNOME Desktop


Typically on Centos servers that we setup will do a minimum base installation of the OS and leave it running on CLI (Command-Line-Interface). However, some customers prefer to use servers in GUI (Graphical User Interface) mode. To that end, here's how we quickly enable the GNOME desktop login on a base installation server.

1. Using yum, we will need to install X Windows System as the based for GUI and rich input device capability:

# yum groupinstall -y 'X Window System'

2. Only then we can install GNOME desktop environment on top of it:

# yum groupinstall -y 'Desktop'

3. Then we install GUI fonts to ensure GUI login is legible:

# yum groupinstall -y fonts

4. Because the server is running in CLI mode, we need to change a start-up value to tell CentOS to boot up in the GUI mode. Open /etc/inittab via a text editor and change following line:




Then reboot:

# init 6

Note: You can switch from GUI to CLI mode manually by using the following method:

GUI to CLI: Ctrl + Alt + F6
CLI to GUI: Ctrl + Alt + F1

If you want to start the desktop from CLI console (not SSH session), use following command:

# startx

And there you have it. a new GUI login and desktop!