ubuntu /etc/rc.local下脚本不起作用

 时间:2026-04-23 10:56:50

1、原因是该系统使用的bash shell 更换成了dash shell。

而/etc/rc.local脚本中用的正是/bin/sh。

所以错误。

2、将默认的shell改成bash的方法:

在终端执行 sudo dpkg-reconfigure dash,然后选择 no  (推荐)

3、sudo rm /bin/sh

sudo ln -s /bin/bash /bin/sh

  • linux内存使用情况查看(free)
  • WinSCP使用方法教程
  • oracle cmd设定用户密码永不过期
  • 图解Redis在Windows下的设置和配置成服务选项
  • 怎样在win7上远程连接linux系统
  • 热门搜索
    牙裂了怎么办 橄榄油的美容方法 湖南农业大学怎么样 河蚌怎么做 牛肉丸子怎么做好吃 视力矫正方法有哪些 牙黄变白最实用的方法 上古卷轴5代码大全 美食天下菜谱家常做法 苹果产品大全