如果Linux启动脚本/etc/rc.local文件没有被执行,可能是因为rc.loca文件没有可执行权限,按以下步骤解决这个问题。

1、/etc/rc.local是/etc/rc.d/rc.local的软链接

执行ls -l /etc/rc.local看看。
在这里插入图片描述

2、看看/etc/rc.d/rc.local的权限

执行ls -l /etc/rc.d/rc.local看看。

在这里插入图片描述

3、修改/etc/rc.d/rc.local的可执行权限

chmod +x /etc/rc.d/rc.local

4、重启解决

reboot

或者

init 6

5、版权声明

C语言技术网原创文章,转载请说明文章的来源、作者和原文的链接。

来源:C语言技术网(www.freecplus.net

作者:码农有道

GitHub 加速计划 / li / linux-dash
10
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:19 天前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐