systemctl和journalctl的用法

systemctl使用方法

 查看当前的服务启动

systemctl list-units --type=service

查看当前服务开机自启,同时过滤程序ConsumerLog

systemctl list-unit-files | grep ConsumerLog

服务启动、状态、停止、重启

启动

systemctl start  *****.service

状态

systemctl status  *****.service

停止

systemctl stop  *****.service

重启

systemctl restart   *****.service

 

 

journalctl使用方法

查看服务启动的程序的日志

journalctl  -u  *****(服务名称)

 

posted on 2023-11-30 10:09  叶子在行动  阅读(94)  评论(0)    收藏  举报

导航