- 路径
/etc/systemd/system创建xxx.service - 本例采用
pppoe.service - 注意所有路径都是绝对路径! ```shell [Unit] Description=PPP over ethernet After=network-online.target systemd-networkd.service Wants=network-online.target systemd-networkd.service
[Service] Type=forking ExecStart=/usr/sbin/pppoe-start ExecReload=/usr/sbin/pppoe-stop;/usr/sbin/pppoe-start ExecStop=-/usr/sbin/pppoe-stop ExecStopPost=-ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf Restart=on-failure
[Install] WantedBy=multi-user.target
```shell// 开机启动sudo systemctl enable httpd// 立即运行sudo systemctl start httpd// 停止运行sudo systemctl stop httpd.service// 杀死进程sudo systemctl kill httpd.service// 重运行sudo systemctl restart httpd.service// 查看状态sudo systemctl status httpd.service
