systemctl
启动、停止、开机自启动
- 启动
通过systemctl start 来启动
sudo systemctl start test.service
1 - 停止
通过systemctl stop 来停止
sudo systemctl stop test.service
1 - 重启
通过systemctl restart 来重启
sudo systemctl restart test.service
1 - 开启开机自启动
通过systemctl enable 来开启开机自启动
sudo systemctl enable test.service