ubuntu shell 提示 source : not found 原因及解决办法

2021/4/30 7:57:25

本文主要是介绍ubuntu shell 提示 source : not found 原因及解决办法,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

现象: 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可以用了~



这篇关于ubuntu shell 提示 source : not found 原因及解决办法的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程