To query the centsos settings online and directly go to the command line interface, you can modify the/etc/inittab file and set & ldquo;: id: 5: initdefault: & rdquo; in the file; change to & ldquo;: id: 3: initdefault: & rdquo; to change the default runlevel from 5 to 3, but the/etc/inittab page under CentOS7 is displayed as follows: to query the centsos settings online, go to the command line interface and change the ": id: 5: initdefault:" In the/etc/inittab file to ": id: 3: initdefault: ", the default runlevel is changed from 5 to 3, but the/etc/inittab page under CentOS7 is displayed as follows:
# inittab is no longer used when using systemd.## ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.## Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target## systemd uses 'targets' instead of runlevels. By default, there are two main targets:## multi-user.target: analogous to runlevel 3# graphical.target: analogous to runlevel 5## To set a default target, run:## ln -sf /lib/systemd/system/
.target /etc/systemd/system/default.target#
Note that the inittab file is no longer used. now CentOS7 uses systemd as the new init system, while systemd uses "target" instead of "runlevel". by default, there are two main targets: multi-user.target: equivalent to runlevel 3rd command line interface, graphical.tar get: equivalent to runlevel 5 [Gui] set the default target, use the command: ln-sf/lib/systemd/system/ . Target/etc/systemd/system/default.tar get here I want to enable CentOS7 to enter the command line interface by default, then run the command:
# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target