Debian-Ubuntu使用update

作者: 7f4cf71ba8f6 | 来源:发表于2018-10-07 17:55 被阅读0次

经常使用的Linux启动项执意在/etc/rc.local的exit 0语句之间增加启动本子,这边说下另外一种方式,应用update-rc.d号令增加/取缔开机启动项,挺好用的。

应用

#将本子增加开机自启,先放入/etc/init.d文献夹,并赐与可实行权限

mv xx.sh /etc/init.d

chmod +x  /etc/init.d/xx.sh

#设置开机自启

update-rc.d xx.sh defaults

#剔除开机自启

update-rc.d -f xx.sh remove

#如其你想取缔顺序开机自启,譬如apache2、nginx

update-rc.d -f apache2 remove

update-rc.d -f nginx remove

关于偶然候不想卸载某些顺序,又不想开机启动的,这类法子挺有效的,还能够节流CPU等资本的使用。

相关文章

网友评论

    本文标题:Debian-Ubuntu使用update

    本文链接:https://www.haomeiwen.com/subject/edalaftx.html