systemctl和journald.service

用systemctl切换模式

设置开机默认的启动方式

[root@study ~]# systemctl set-default multi-user.target

[root@study ~]# systemctl get-default

切换启动方式

图形切换终端

[root@study ~]# systemctl isolate multi-user.target 对应原来的init 3

终端切换图形

[root@study ~]# systemctl isolate graphical.target 对应原来的init 5

救援模式

[root@study ~]# systemctl rescue 强制进入救援模式 对应原来的init 1 单用户模式

服务存在的路径

一般自己安装的服务建议在这个目录下

/etc/systemd/system

系统安装的服务在

/usr/lib/systemd/system/

服务与端口的对应

/etc/services

设置开机启动/不启动
[root@study ~]# systemctl disable chronyd.service


查看所有的服务

[root@study ~]#systemctl 查看所有启动的服务

[root@study ~]# systemctl list-unit-files 查看所有安装的Unit

systemctl list-units --type=target --all 只查看所有安装的service unit

查看服务的依赖性

systemctl list-dependencies graphical.target

journald

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值