How to boot CentOS 7 into Command Line or GUI Mode

CentOS-LogoIn CentOS 7 we can use the systemctl command to select which mode the OS boots into. If you have a GUI like Gnome or KDE installed, it’s easy to boot directly into your preferred environment.

To find out what mode CentOS is currently using, use this:

This will give you one of two “targets”, either

  • multi-user.target (the command line), or
  • graphical.target (the Windows-like GUI)

To change from one to the other, use one of these commands:

What happened to runlevels?

In previous versions of CentOS, switching boot modes was achieved through runlevels. Those were saved in /etc/inittab, but this file is no longer used by CentOS 7 and above. However, the file still exists and contains a little extra info this matter, including how to change boot modes:

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Add your voice!