參考: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