Install Gnome GUI on CentOS 7 / RHEL 7

Linux admins spend most of their time on working in a terminal; there are some who like to work on GUI instead of a terminal. By default, CentOS 7 installed as the minimal server, and user intervention is required to change the installation type. This guide will help you to install GUI on CentOS 7 on the top of the minimal server installation.

Before installing GUI, make a Local Yum Repository to avoid downloading packages from the internet.

READ: How to Configure YUM repository on CentOS 7 / RHEL 7

Optional: Run the following command to list down the available package groups for CentOS 7.

# yum group list

Output:

Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
Available Environment Groups:
 Minimal Install
 Compute Node
 Infrastructure Server
 File and Print Server
 Basic Web Server
 Virtualization Host
 Server with GUI
 GNOME Desktop
 KDE Plasma Workspaces
 Development and Creative Workstation
Available Groups:
 Compatibility Libraries
 Console Internet Tools
 Development Tools
 Graphical Administration Tools
 Legacy UNIX Compatibility
 Scientific Support
 Security Tools
 Smart Card Support
 System Administration Tools
 System Management
Done

Step 1: Install Gnome GUI packages using the YUM command.

CentOS 7:

# yum groupinstall "GNOME Desktop" "Graphical Administration Tools"

RHEL 7:

# yum groupinstall "Server with GUI"

Step 2: Enable GUI on system startup. In CentOS 7 / RHEL 7,  systemd uses “targets” instead of runlevel. The /etc/inittab file is no more used to change run levels. So, issue the following command to enable the GUI on system start.

# ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target

Step 3: Reboot the machine to start the server in the graphical mode.

# reboot

License Agreement:

Accept the license by clicking on the “LICENSE INFORMATION“.

Install Gnome GUI on CentOS 7 – Licensing Page

Tick mark the “I accept the license agreement” and click on “Done“.

Install Gnome GUI on CentOS 7 – License Agreement

Click on “FINISH CONFIGURATION” to complete the setup.

Install Gnome GUI on CentOS 7 – License Accepted

You may need to do some post configuration tasks, like creating first user (local account), language, etc.

Then finally you will get the desktop.

Install Gnome GUI on CentOS 7 – GUI Desktop

That’s All. You have successfully installed GUI on CentOS 7 / RHEL 7.

centos 7desktopguirhel 7runlevel
Comments (51)
Add Comment
  • Umakanta

    Thank you so much.

  • joepr

    Just what I was looking for! Excellent

  • Boris V.

    Exactly the info I needed. Thank you. Tried it, but with no result, System still boots into CLI. Target file exists, link looks good… Hmm.. Will investigate more. Thank you anyway.

  • Denden

    Thanks much!
    This was what I needed. You rock!! 🙂

  • Trung

    Thank you about your post, It’s really useful!

  • selim

    google documans

  • robertm0606

    First, thank you for your manual.
    After installation, system starts fine. I installed it on Virtualbox. Installed the VirtualBox modules. Restarted system. Logged in to TTY as user. Run startx. GNOME starts. Everything is ok. Now, I wanted, that the GUI will start automatically and took the ln -sf… order. After reboot the GUI starts. Now logged in with user account and GNOME crashed. Had to log out. Could it be, that I deleted the original default.target file? When I start the GUI with user root the GUI starts without problems.

  • Çağrı

    Thank you so much!

  • Jim Do

    Make sure initial install with minimal server instead

  • Nick Andrews

    Shouldnt step 2 be …

    systemctl set-default graphical.target

    … the correct way to change the runlevel on systemd?

  • kimsonha

    Hey bro, Im following your tut, but when I rebooted the VPS (CentOS 7), I cannot ssh to it again, can you tell me why?

    • Raj

      Hi,

      I faced same issue, do not change the run level after the gnome installation. Let that boot in 3 run level, configure either xrdp or VNC to take graphical display

  • amit

    thanks a lot,its working.

  • Reza

    very very good !!!
    it was a nice post for me ! 😉

  • satish

    my vm ended up with black screen..after executing “ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target” and rebooting.

    • math

      Same problem here. I m in a vm too.

      • eugene

        Same here haha. Did you guys figure out how to fix it?

        • noel

          hahaha…rebooted the vm about three times hoping to get an extra option to enable or download gui package 🙂 and yum group list isn’t working as well

          • Klaujesi

            From: http://wiki.centos.org/Manuals/ReleaseNotes/CentOS7

            In VirtualBox up to version 4.3.12 the building of the vBox additions fails. This is solved starting with version 4.3.14. On Windows hosts there still seem to be some issues with versions up to 4.3.16. After installing vBox additions logging in to GNOME Desktop results in a black screen or a terminating VM.

    • Nugy

      Not sure if this is still an issue but I was having the same issue with a VirtualBox VM. I installed a fresh VM and repeated the same steps but didn’t run this command.

      When I tried to run ‘startx’ I kept getting an error and was eventually able to track it down to an error like “ImportError: No module named _isys”.

      Eventually I just ran ‘yum update’ and it solved the issue.

      Hope this helps

    • LQQL2

      A “yum update” also fixed the issue for me

  • Eva

    Thanks, it worked!
    Strange the installation didn’t install de GUI packages even when I hade chosen Server with Gui. This did the trick though…..!

  • PDawg

    F@#$%&* Awesome!!! Thanks a bunch!

  • BarefootMonkey

    Working very nicely – just make sure you install gnome to avoid disappointment 🙂

  • Brian Ellse

    Probably a stupid question…. I have a dedicated server about 5000 miles from me. It runs Centos 7 with Cpanel/WHM and i have reboot capability (soft and hard). Would this install work purely via my ssh (root) access, given I will never be sitting in front of this device keyboard/monitor. I plan to install xrdp or VNC once I have this GNOME installed, but will need it to load without keyboard inputs/local setup on first reboot after install. Hope I am making sense.

    • vinci

      Of course it will work through ssh. You’re only installing a package, you’re not actually entering gnome through ssh.

  • Lucas Muñoz

    It worked!., i had the same Eva Promem’s. Instaling Gnome do the trick

  • dissan

    Thanks bro…….helped a lot…………………..nice post

  • YnnoSWaFu

    Thanks… it worked… 🙂

  • Guilherme Berbelini

    Great !

  • dean overlin

    Didn’t work for me, rebooted and still pulling up terminal

    • Nauseous

      init 5

  • Rafael Rossi

    Good 🙂

  • Morris Rockefeller

    yum groupinstall “GNOME Desktop” “Graphical Administration Tools”
    on Centos 7
    is not working

    • Raj

      It should work, make sure you have CentOS base repository enabled on your system.

      • Morris Rockefeller

        This one worked:
        #yum -y groups install “GNOME Desktop”
        #startx /** to start gnome **/

    • Valdeir Gomes

      For me worked.

  • Valdeir Gomes

    Very nice, work perfectly. Thanks to share.

  • Christian Lopes

    Worked flawlessly with CentOS 7. Thank youo very much!

  • Renan

    Thanks! It worked like a charm.

  • noob

    After the whole download process my screen went black and then when I pressed enter, it showed up that I was supposed to type “y” to confirm something and now I think I must have not confirmed to install. Is that correct?

    • noob

      Nvm, after being asked to download it again, it knows that files have already been downloaded so it just installs those.

  • Dean Han

    Thanks! That was easy for Centos 7.4 64-bit.

  • qadiza

    Many thanks. It sure took me to the GUI after reboot

  • Jay Dodge

    There is a error with step #1

    CentOS 7

    # yum group install “GNOME Desktop” “Graphical Administration Tools”

    There shouldn’t be a space between group and install this should read

    CentOS 7

    # yum groupinstall “GNOME Desktop” “Graphical Administration Tools”

    • Raj

      Thanks.

      Both commands are same and it should work.