centos7 switch graphic mode and text mode
In the graphic mode using ctrl + alt + F2 to switch to a text mode.
text mode press ctrl + alt + F2 to switch back to the graphic mode.
Enter the command init 3 to switch to text mode.
Enter the command init 5 to switch to graphic mode.
If you want to start the default in some way Use systemd create a symbolic link to the default run level.
Modification method:
1. First remove the symbolic link already exists
[levi@localhost ~] rm /etc/systemd/system/default.target
2. The default level is converted to 3 (text mode) Or default level is converted to 5 (graphics mode)
[levi@localhost ~] ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
Or
[levi@localhost ~] ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
3. Restart
[levi@localhost ~] reboot
centos version 7 or less
With root to edit /etc/inittab
The
id: 5: initdefault:
To
id: 3: initdefault: