Skip to content

第一步:停止服务 ​

shell
sudo systemctl stop <服务名>

第二步:禁用服务 ​

shell
sudo systemctl disable <服务名>

第三步:删除服务单元文件 ​

shell
sudo rm /etc/systemd/system/<服务名>.service
sudo rm /lib/systemd/system/<服务名>.service

第四步:重载 systemctl 配置 ​

shell
sudo systemctl daemon-reload

第五步:验证移除结果 ​

shell
systemctl list-units --type=service | grep <服务名>

MIT版权,未经许可禁止任何形式的转载