11.1-systemctl-管理
systemctl
init pid 1
# systemd 服务配置目录
ls /etc/systemd/system
# systemd 管理目录
ls /lib/systemd/system
# .service 后台服务 .target 运行级别
# 默认的运行级别 【了解下即可】
systemctl get-default
# 命令行界面
systemctl set-default multi-user.target
# tab 看运行级别 0-6
# 0 关机 shutdown.target
# 1 一用户不能联网 rescue.target
# 2 多用户不能联网
# 3 (multi-user.target)
# 4 预留
# 5 图形化 graphical.target
# 6 重启 reboot.target
systemctl get-default
# 重启生效