1. Switch RunLevel/target using commands
# Systemctl Isolate Multi-user.target//switch to run Level 3, this command has no effect on the next boot, equivalent to Telinit 3 # Systemctl Isolate Runlevel3.target//switch to run Level 3, this command has no effect on the next boot, equivalent to Telinit 3 # Systemctl Isolate Graphical.target//switch to run Level 5, this command has no effect on the next boot, equivalent to Telinit 5 # Systemctl Isolate Runlevel5.target//switch to run Level 5, this command has no effect on the next boot, equivalent to Telinit 5 |
2. Modify the default run level/target
You can run the following command to set the default entry to text mode or graphics mode at startup.
# Ln-sf/lib/systemd/system/multi-user.target/etc/systemd/system/default.target//Text mode # Ln-sf/lib/systemd/system/graphical.target/etc/systemd/system/default.target//Graphics mode |
The target for boot-in is Default.target, which is the default link to Graphical.target (roughly equivalent to the original RunLevel 5). The default runlevel can be changed by kernel parameters (see Chapter 1th).
You can also execute the SYSTEMCTL command, which sets the default entry to text mode or graphics mode at startup.
# systemctl-f Enable Multi-user.target//Text mode # systemctl-f Enable Graphical.target//Graphics mode |
CentOS Boot Run level change