systemctl list-unit-files
参考:
https://forum.ubuntu.org.cn/viewtopic.php?f=48&t=478420
会列出开启的和未开启的:
使用grep过滤一下开启的grep enabled
然后使用
systemctl status openresty.service
查看这个.service
文件的路径,及内容。
禁用开机启动:
sudo systemctl disable mongodb.service
sudo systemctl disable nginx.service
sudo systemctl disable redis-server.service
停止已经开启的服务:
sudo systemctl stop mongodb.service
sudo systemctl stop nginx.service
sudo systemctl stop redis-server.service