How To Start GUI In CentOS 7 Linux

By default a full installation of CentOS 7 will have the graphical user interface (GUI) installed and it will load up at boot, however it is possible that the system has been configured to not boot into the GUI.

In this quick guide we will show you how to swap to the GUI and enable it to start up by default on system boot.

Start GUI In CentOS

In this example I have installed CentOS 7 but we are not currently using the GUI. With the systemctl command, we can list the default target that the system is configured to boot into.

[root@centos7 ~]# systemctl get-default
multi-user.target

The multi-user.target is similar to the well known run level 3, which is essentially console only with networking enabled.

We can start the GUI right now (as long as there is a GUI installed) by running ‘systemctl isolate graphical.target’.

[root@centos7 ~]# systemctl isolate graphical.target

While this will start the graphical user interface by moving us into the graphical target (similar to run level 5), if we perform a reboot we will not be presented with the GUI. To do this, we must first set the graphical target to become the default.

[root@centos7 ~]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.

Now if we reboot the system we will automatically boot into the GUI, which ever version you may have installed. If you’re interested in changing things up, check out our posts on installing different GUIs in CentOS.



Summary

We have seen that we can easily change the current target to the graphical target at run time, and to set the system to boot to the graphical target automatically.

Leave a comment ?

12 Comments.

  1. Stupid question perhaps, but how on earth do you stop gnome and return to the console? I mean I do not want gnome to be my permanent user interface, so I can use “systemctl isolate graphical.target” to start it whenever I want, bubt how on earth do I exit from it?!?!

    • You’d want to do the opposite to this, so “systemctl set-default multi-user.target”.

      • I want the default target to be multi-user , but also want to be able to switch between the graphical desktop and the console as needed…without needing root access.

        ie.
        Boot system to console
        Login as non-root user
        Start the gnome desktop to complete a task that requires it
        Return to console.

        Can this be done?

        • Exactly! I am not even interested in set-default graphical.target. Jusst start gnome, do whatever I need to do in it and exit to the console again.

          I think I could do it in Centos 6, but I no longer remember how I did it!!!

        • Hello,

          did u already found a solution?
          :D

        • In case anyone comes to this page first, here’s a solution – regardless of your current set-default setting, run “systemctl isolate graphical” to start the GUI and use “systemctl isolate multi-user” to stop the GUI completely and go back to console.

  2. while installing Centos 7 you will ask to select which mode you want to install here you can select a mode from minimal to high end graphic server mode, please check when its ask you to check your configuration while installing in starting steps.

  3. William Hillary Bean

    In a terminal window from the gui type:

    systemctl isolate multi-user.target

  4. Hi,

    Everything above mentioned, I did, no issues running these commands.But I still get to the cli prompt when re-booting the laptop
    OS Centos 7
    GNOME server installed
    All updates are done
    thank u
    jon

  5. it didnt create it. mine is just down to a shell . no gui

  6. Nice how-to!

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>