ubuntu20.04启用rc.local
1. sudo vim /lib/systemd/system/rc-local.service
文件末添加
[Install]
WantedBy=multi-user.target
Alias=rc-local.service
2. sudo ln -s /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service
3. sudo vim /etc/rc.local
4. sudo chmod +x /etc/rc.local
5. reboot