1.5 Log into graphical and text mode consoles

CentOS 7

To find out what mode CentOS is currently using, use command:
# systemctl get-default

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

  • multi-user.target - the command line intreface (CLI), or
  • graphical.target - graphical user interface (GUI)

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

# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
# 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.

openSUSE Leap 42.3

The same way as in CentOS 7

Ubuntu 17.04

If you logged in GUI mode you can move to console anytime by pressing Ctrl+Alt+F1 and return to GUI at anytime using Ctrl+Alt+F7

To find out what mode Ubuntu is currently using, use command:

$ sudo systemctl get-default

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

  • multi-user.target - the command line intreface (CLI), or
  • graphical.target - graphical user interface (GUI)

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

$ sudo systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
$ sudo 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.
Then additionally you need to make changes in to /etc/default/grub
For GUI set options
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"
GRUB_CMDLINE_LINUX=""
For CLI set options
GRUB_CMDLINE_LINUX_DEFAULT="text"
GRUB_CMDLINE_LINUX="text"
After change this file, run command
$ sudo update-grub
then reboot system
Publication/Release Date: Jun 25, 2017
Reviewed: Jun 26, 2017

Advertisement