systemctl用法及journalctl查看日志

查看服务状态

sudo systemctl status caddy

启用服务(开机自启)

sudo systemctl enable caddy

禁用服务(开机不自启)

sudo systemctl disable caddy

重启服务

sudo systemctl restart caddy

停止服务

sudo systemctl stop caddy

查看日志

sudo journalctl -f -u caddy

 

Leave a Reply

Your email address will not be published. Required fields are marked *