Centos-7 Settings Boot to the text interface (not to the graphical interface)
: /etc/inittab = /etc/inittab = /etc/inittab = /etc/inittab = /etc/inittab = /etc/inittab = /etc/inittab = /etc/inittab
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
This file does not look the same in centos-6 as it does in centos-7:
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# ll /etc/inittab
-rw-r--r--. 1 root root 511 Nov 19 2015 /etc/inittab
[root@localhost ~]# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/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 view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target
#
There is no place to set the level.
In fact, in Centos-7, you can directly enter the text interface without entering the graphical interface by using the command setup:
[root@localhost ~]# which systemctl
/usr/bin/systemctl
You can use your own man systemctl, but don’t go too far
Here is how to set it:
[root@localhost ~]# systemctl get-default
graphical.target
[root@localhost ~]# 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.
[root@localhost ~]# systemctl get-default
multi-user.target
Systemctl get-default is used to get the current default target.
use systemctl set – the default can be set the default target, the target can be graphical, target, multi – user. Target.
Well, that’s basically it, reboot and you’ll go straight to the text interface.
Reference source
Read More:
- Centos7 installation interface without interface
- Turn on / off Ubuntu 20.04 graphical interface
- [kimol Jun’s boring little invention] – using Python to write paper downloader (graphical interface)
- Several choices of using Python to write graphical interface program
- How to generate main () method in java graphical interface
- Remember once to solve the problem that Ubuntu 18.04 can’t enter GUI
- The problem that headers [‘content-type ‘] does not work is set in the Axios get method request interface
- How to set vscode interface to Chinese
- To solve the problem of C # calling excel interface error, prompt: the COM object of Microsoft. Office. Interop. Excel. Applicationclass is forcibly converted to the interface type “Microsoft. Offi”
- Centos6 suddenly cannot access the network VM communication interface socket family: failed
- When to enter success and error in AJAX
- Why can’t Scala shell enter Q to exit
- Git still needs to enter the user name and password after configuring the public key
- Installation user interface mode not supported solution
- How to solve the problem of “please enter a commit message to explain why this merge is necessary” when git merges branches?
- After canceling the startup of Ubuntu terminal, it will automatically enter the base environment of CONDA
- IIS 7.5, ASP.NET MVC. HTTP error 500 (internal server error), but debugging does not enter the background, the browser only reports 500 errors
- A new virtual machine cannot be connected to the network (error fetching interface information device not found),
- The problem of flash back by pressing enter window when debugging or executing program in Visual Studio C
- As Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.