Seven's blog

你不会找到路,除非你敢于迷路

0%

systemctl 常用用法简介

查看某个服务的状态

1
systemctl status ${service_name}

关闭某个服务

1
systemctl stop ${service_name}

开启某个服务

1
systemctl start ${service_name}

查看某个服务是否为开机自启动

1
systemctl is-enabled ${service_name}

设置某个服务为开机自启动

1
systemctl enable ${service_name}

取消某个服务的开机自启动

1
systemctl disable ${service_name}

查看所有被设置为开机自启动的服务

1
ls /etc/systemd/system/multi-user.target.wants

参考文献

  1. Linux systemctl 常用用法简介
微信公众号
扫码关注, 一起进步!