/bin/sh needs to point to bash and by default Ubuntu points sh at dash. You can make the change either by brute-force (i.e. just change the link for /bin/sh) or use the 'update-alternatives' mechanism in ubuntu:
sudo update-alternatives --install /bin/sh sh /bin/dash 1
sudo update-alternatives --install /bin/sh sh /bin/bash 1
sudo update-alternatives --config sh
Select the entry for /bin/bash and to make sure, try '/bin/sh --version'.
If sh is pointing at bash, you'll get a version message (GNU bash, version 4.1.5... ), if it's pointing at dash, you'll get a message like: /bin/sh: Illegal option --
本文详细介绍了如何在Ubuntu系统中通过更新替代机制将默认的/bin/sh链接更改为指向bash,包括使用`update-alternatives`命令进行配置。
4105

被折叠的 条评论
为什么被折叠?



