Ubuntu解决sudo: source: command not found错误

喜欢ヅ旅行 2022-06-05 08:51 1649阅读 0赞

现象: shell脚本中source aaa.sh时提示 source: not found

原因: ls -l `which sh` 提示/bin/sh -> dash

这说明是用dash来进行解析的。

改回方法:

命令行执行:sudo dpkg-reconfigure dash

在界面中选择no

再ls -l `which sh` 提示/bin/sh -> bash

修改成功,source可以用了~

我的是bash

仍然无法使用

sudo -s

切换到root

发表评论

表情:
评论列表 (有 0 条评论,1649人围观)

还没有评论,来说两句吧...

相关阅读