systemctl 启动/关闭/启用/禁用服务


一、启动服务

systemctl start test.service

二、停止服务

systemctl stop test.service

三、重启服务

systemctl restart test.service

四、查看服务状态

systemctl status test.service

五、设置开机自启动服务

systemctl enable test.service

六、禁止开机自启动服务

systemctl disable test.service

七、查看是否开机自启动

systemctl is-enabled test.service

八、查看已启动服务列表

systemctl list-unit-files|grep enabled

九、查看启动失败服务列表

systemctl --failed

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM