修改linux启动级别

linux 能力比较弱,但我觉得并没有什么难的,慢慢学,慢慢积累。

虚拟机中的centos越来越慢,我也觉得没什么必要一直默认启动UI,不如命令行模式省资源,而且我都是windows里putty直接链接过去的,也用不到ui,所以准备把linux的默认启动级别修改到命令行。

于是我查到一个文章,比较老,文章中说要 ”修改/etc/inittab文件”,于是照做,出现如下提示:

ear 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

于是照做,如下: 


修改linux启动级别

重启之后就可以了。