说明:常用的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-rc.d命令添加/禁止开机启动项
最新评论
请问下,python3 tg_username_update.py都会提示下面这个是因为什么啊 Traceback (most recent call last): File "tg_username_update.py", line 21, in <module> cake = emojize(":cake:", use_aliases=True) TypeError: emojize() got an unexpected keyword argument 'use_aliases'
不可以了
# Install [Debian] [bullseye] [amd64] Downloading... grep: (standard input): binary file matches Error! grub.cfg. root@RRR2:~#
博主你好,请问cloudfront 上传收费这个是事实吧,已经找了几个贴子确认了。 那有什么好办法能够避开这个收费呢?如果不能避开感觉还是cloudflare 比较稳。
来看看
第5步添加自定义主机名进去后等txt验证提示custom hostname does not name to this zone
那没事了,我静态博客。谢谢
为什么缓存键和源请求那里不设置缓存?