Ubuntu18.04 设置rc.local 启动脚本,以增加系统自启动时的应用
2022-10-17
admin
233
1、添加rc-local.service
sudo ln -fs /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service
sudo vi /etc/systemd/system/rc-local.service
添加:
[Install]
Wsudo antedBy=multi-user.target
Alias=rc-local.service
2、编写rc.local 脚本
sudo touch /etc/rc.local
sudo chmod 755 /etc/rc.local
sudo vi /etc/rc.local