运行级别以及调整运行级别和systemd
发布日期:2021-05-06 22:23:40 浏览次数:16 分类:技术文章

本文共 571 字,大约阅读时间需要 1 分钟。

各个级别的作用

0(poweroff.target):关机
1(rescue.target):单用户模式
2、3、4(mulit-user.target):多用的文本界面
5(graphical.target):多用的图形界面
6(reboot.target):重启

systemctl get-default  获取系统的默认级别runlevel  获取系统的默认级别systemctl set-default reboot.target   永久调整级别,下次重启生效init 6  临时调整级别

systemd

常用命令:

systemctl status    查看服务运行状态systemctl cat       查看服务的配置文件所在位置systemctl start     启动服务systemctl restart   重启服务systemctl stop      暂停服务systemctl reload    重新加载配置文件systemctl is-active 查看服务是否正在运行

单用户模式

重启虚拟机,

在选择系统界面,按下e,
在quit 后面输出 enforcing=0 /bin/bash ,
ctrl+x 进入单用户模式 ,
mount -o rw,remount / 重新挂载根目录,指定读写权限

上一篇:JDK的3个bug
下一篇:CentOS 8 已下载ntpdate 却无法使用crond进行时间同步

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2025年03月31日 10时43分26秒