How to add Gnome to a CentOS 6 minimal install

I have been using the minimal iso (CentOS-6.0-x86_64-minimal.iso) to install CentOS 6. I wanted to add a GUI to my vm, but I could not find easy documentation showing how to add a GUI, or Gnome in this case, to a CentOS 6 minimal install. I was not looking for the smallest X windows install, I was just trying to get the Desktop to function like it would as if I installed from the full DVD.

There are a lot of results of how to do this, but things have been renamed in CentOS 6, so that made it more difficult to figure out. Also, there are “Short Names” and I am assuming they are called “Long Names” associated with a yum groupinstall, which added to my confusion.

To add Gnome/GUI to a minimal CentOS 6 install run (short name version):

yum groupinstall basic-desktop desktop-platform x11 fonts

And the “long name” version:

yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts"

Hope that helps someone or at least help me to remember.

61 Responses to How to add Gnome to a CentOS 6 minimal install

  1. Rajeev December 19, 2011 at 2:29 pm #

    I was looking for this and found this very helpful. Thank you.

  2. ZenZa February 16, 2012 at 12:30 pm #

    Thanks, it helped a lot πŸ™‚

  3. Harsh February 19, 2012 at 11:58 am #

    Hope that helps someone or at least help me to remember.

    It helped me. Thank you for the notes!

  4. Lawrence March 25, 2012 at 6:21 pm #

    This is exactly what I was looking for.
    I forgot to check the X window when installing CentOS 6 from the ISO. Some posts said I should run: yum groupinstall “Desktop” “X Window System”. I did that, but I did not get any fonts after startx. Now I know I was missing something in the command.
    I wondered how to do the same using the ISO. Would you mind sharing that also? Thanks much!

  5. jbmurphy March 26, 2012 at 10:05 am #

    I am not sure how to do this with the ISO, I always just install from the minimal ISO, so I don’t ever have the X Windows bits on the ISO.
    Thanks for taking the time to comment!

  6. Jordan Eunson April 25, 2012 at 6:49 pm #

    OMG, thank you so much, this was exactly what I was looking for.

  7. jbmurphy April 25, 2012 at 7:16 pm #

    Glad I could be of assistance! Thanks for taking the time to comment.

  8. Moro May 8, 2012 at 8:21 am #


  9. Xmodulo May 24, 2012 at 10:50 am #

    I was trying to set up minimal X windows on CentOS, and your tips greatly helped. Thanks!

  10. jbmurphy May 24, 2012 at 12:35 pm #

    Glad I could help! Thanks for taking the time to comment.

  11. rob June 2, 2012 at 9:05 pm #

    very helpful, worked perfectly.

  12. Nirmal Pathak June 7, 2012 at 1:14 pm #

    You need to add following line in /etc/inittab file after installing Desktop Environment & Xorg packages.

    exec /etc/X11/prefdm -nodaemon

  13. jbmurphy June 8, 2012 at 7:55 am #


  14. Nicolas M. June 20, 2012 at 1:43 pm #

    Nirmal Pathak > Acually just changing the default runlevel from 3 to 5 in the inittab should suffice.

  15. Nirmal Pathak June 20, 2012 at 3:52 pm #

    Once the minimal installation is done & then you are installing the Deskstop Packages changing Default runlevel from 3 to 5 does not start Xorg for GUI hence we need to add “exec /etc/X11/prefdm -nodaemon” in /etc/inittab file. πŸ™‚

  16. Asif N July 23, 2012 at 11:51 am #

    Thanks!! Great help!

  17. tons872 July 26, 2012 at 10:22 pm #

    thanks a lot.!!!

  18. J.D. August 5, 2012 at 9:00 pm #

    Thanks, this is exactly what I was looking for!

  19. jbmurphy August 6, 2012 at 8:00 am #

    Thanks for talking the time to comment. Glad I could help.

  20. Taner August 18, 2012 at 4:17 pm #

    Thanks for the guidance. It worked nicely.

    Any idea what would be the command(s) to remove GUI support?

    Thanks in advance..

  21. jbmurphy August 20, 2012 at 9:57 am #

    I usually don’t remove the GUI, I just change the init state to 3. Actually I usually leave it at three and run startx when I need a GUI.

  22. Taner August 23, 2012 at 12:44 pm #


  23. vicky September 4, 2012 at 2:41 am #


  24. Mike September 14, 2012 at 8:50 am #

    Very helpful for installing the Gnome desktop. I am an avid supporter of the CentOS project, so I need to install the basic server without the desktop. However, I am currently testing a restore of email and needed to add a desktop and Thunderbird.

    Thanks again!

  25. Thamizharasan P (India) October 2, 2012 at 7:44 am #

    Its very helpful , Thanks a lot πŸ™‚

  26. Bhanu November 5, 2012 at 7:59 am #

    Super ..Great help!!!!!!!!!!!!!!!!!Nice information ….

  27. Leydi November 11, 2012 at 10:45 pm #

    Gracias por compartir!!… Muy util!… Justo lo que buscaba

  28. shuimuyq November 23, 2012 at 7:35 am #

    Thanks a lot!

  29. Andre November 24, 2012 at 11:23 am #

    Thanks for the tip !
    Precise info!

  30. ali fraz January 7, 2013 at 12:05 am #

    excellent post great work really appreciate

  31. Alan January 8, 2013 at 4:52 pm #

    Thanks! This helped.

  32. ismail January 26, 2013 at 10:19 am #

    I installed centos 6.2 x86_64 minimal gnome and i want to switch to full gnome but don’t know how. Do you have any solution for this ?

  33. jbmurphy January 29, 2013 at 4:24 pm #

    I hardly ever use a GUI, so I don’t know. Sorry.

  34. S V Prasad February 6, 2013 at 7:51 am #


    I installed centos 6.3 basic server on a Fujitsu Laptop lifebook T4215. I could not install using full install so i installed using basic Video driver. Later I downloaded drivers from Intel related to GM945 graphic processor hoping that it would take care of display issue. Then i added as explained in this thread gnome desktop and modified the /inittab file as well. The display just hangs and I tried CTL+ALT+F6 to switch to CLI mode but nothing happens. Looks like I have to reinstall again. Could any of you suggest how can I go back to command mode again with out reinstalling everything again. Any help would be greatly appreciated.

    Thanks in advance.
    S V Prasad

  35. jbmurphy February 6, 2013 at 11:00 am #

    If you hit Ctrl + Alt + F1, that should take you back to the text console. Log in, change your init state back to 3. Reboot. Then make sure your gnome session works with startx. Will that work? Not sure about the different drivers, but if it works with startx, it should work with init state 5. I think.

    Hope that helps.

  36. S V Prasad February 6, 2013 at 6:28 pm #

    I tried hitting , (comma) as suggested by you but still I can see blank screen only. Am I missing something. When should I press the “comma key”. After I boot the system it lists windows or Centos. I select centos and booting process starts. I can see some colour bands wirh centos then everything goes blank and there is no way I could do anything after that. No key works. I have to only power down to start again. I am not clear when should i press the suggested key. Could you please bit more clear. Thanks for your help.

  37. jbmurphy February 6, 2013 at 6:32 pm #

    Sorry, WordPress hid my “Ctrl + Alt + F1 “.

  38. jbmurphy February 6, 2013 at 6:35 pm #

    And you hit Ctrl + Alt + F1 after the system is done booting and it goes blank. This should show you the console loggin, where you can login and change your init state back to 3. Then reboot.
    After that log in and try startx. This should allow you to troubleshoot X. Hope that helps.

  39. S V Prasad February 6, 2013 at 7:30 pm #

    Thanks Murphy but unfortunately still it is not coming out. May be I have to reinstall everything again. I fear may be the display driver has some problem.

  40. jbmurphy February 15, 2013 at 2:27 pm #

    Sorry I wasn’t able to help. I am sure you have re-installed by now, but the only other thing I could think fo was to ssh into the box from another machine and chage the initab back to 3 remotely.

  41. S V Prasad February 16, 2013 at 6:39 am #

    I did reinstall everything and updated video drivers. Now everything is working fine. Thanks for your support.

  42. chadunplugged March 14, 2013 at 10:59 am #

    Worked like a charm! GJDM

  43. jbmurphy March 14, 2013 at 2:54 pm #

    Thanks for taking the time to comment. It always makes my day!

  44. marcelo March 22, 2013 at 12:15 am #

    Thanks a lot. Help me a lot.

  45. Ed March 22, 2013 at 5:01 pm #

    Thank-you * inifinity

  46. Cailin Coilleach April 4, 2013 at 2:35 pm #

    Yup, helped me too πŸ™‚

    Throwing this into Evernote, so I will always have it handy. Thanks!

  47. Dan April 5, 2013 at 6:54 pm #

    Thank you very much. I was setting up VMware Fusion on my Mac and installed CentOS 6 minimal and then installed gnome-desktop and gdm but the login screen was just blocks or whatever those special characters are. Not sure which of the groupinstall was necessary, don’t care, it works.

    Thank you


  1. Centos 6.2 Gui interface problem - June 21, 2012

    […] Just to clarify, you selected "Desktop" during the install and have no GUI? You could try this:…nimal-install/ […]

  2. | Install GNOME Desktop through YUM - November 8, 2012

    […] about twice a year and I can never remember which packages are needed.Β  Jeffrey B. Murphy has a post that explains it simply, and I’ll repeat the simple yum command here: yum groupinstall […]

  3. [CentOS 6] GNOME Desktop μ„€μΉ˜ | Zyn - March 6, 2013

    […] λ‚΄μš©μ€ μ΄κ³³μ—μ„œ μ°Έμ‘°ν•˜μ˜€μŠ΅λ‹ˆλ‹€: […]