Today, a graphic interface for centos7 was installed, but it was found that the default Startup mode cannot be changed to the command line mode in the previous method. Previous method: modify id: 3: initdefault in the/etc/inittab file, change 3 to 5, and then
Today, a graphic interface for centos7 was installed, but it was found that the default Startup mode cannot be changed to the command line mode in the previous method.
Previous method: modify id: 3: initdefault in the/etc/inittab file, change 3 to 5, and restart the system;
In some research, the modification method of centos7 has changed, and the record is as follows, for later reference only:
1. view the/etc/inittab file
2. the file description shows that centos has only two startup modes:
multi-user.target: analogous to runlevel 3# Command line modegraphical.target: analogous to runlevel 5# Graphic mode |
3. run the systemctl get-default command to obtain the current mode:
4. run the systemctl set-default multi-user.target command to modify the startup mode:
5. reboot verification results