systemctl设置程序开机启动、关闭、启用/禁用服务以vsftpd为例

参考:https://blog.csdn.net/qq_29663071/article/details/80814081

systemctl是RHEL 7 的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。

可以使用它永久性或只在当前会话中启用/禁用服务。

启动服务:systemctl start vsftpd.service

关闭服务:systemctl stop vsftpd.service

重启服务:systemctl restart vsftpd.service

显示服务的状态:systemctl status vsftpd.service

在开机时启用服务:systemctl enable vsftpd.service

在开机时禁用服务:systemctl disable vsftpd.service

查看服务是否开机启动:systemctl is-enabled vsftpd.service

查看已启动的服务列表:systemctl list-unit-files|grep enabled

查看启动失败的服务列表:systemctl --failed

原文地址:https://www.cnblogs.com/Li-JT/p/14018659.html