ubuntu开机自启动脚本编写

1、将启动脚本复制到/etc/init.d目录下面

2、chmod 755 /etc/init.d/xxx

3、sudo update-rc.d /etc/init.d/xxx defaults 95

 注:其中数字95是脚本启动的顺序号,按照自己的需要相应修改即可。

卸载启动脚本的方法:

$ cd /etc/init.d
$ sudo update-rc.d -f xxx  remove

原文地址:https://www.cnblogs.com/likailiche/p/4877672.html