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

posted @ 2021-08-26 18:59  【黑手套】  阅读(1208)  评论(0编辑  收藏  举报