制作service :
vim /etc/systemd/system/shadowsocks.service1
[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=ssserver -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target
开机自启动:
systemctl daemon-reload
systemctl enable shadowsocks
systemctl start shadowsocks
(1)查看启动日志
journalctl -f或者 journalctl -xe
(2)设置开机自启动
systemctl enable nginx.service
(3)启动nginx服务
systemctl start nginx.service
(4)停止开机自启动
systemctl disable nginx.service
(5)查看服务当前状态
systemctl status nginx.service
(6)重新启动服务
systemctl restart nginx.service
(7)查看所有已启动的服务
systemctl list-units --type=service
评论区