Ubuntu下shell脚本运行异常:bash和dash的区别
来源:互联网 发布:linux就该这么学 下载 编辑:程序博客网 时间:2024/05/22 10:23
echo $SHELL --> /bin/bash
type sh --> /bin/sh
然后我到/bin下看了有"sh -> dash",原来sh是/bin/dash的链接。
后来google了一下才发现,buntu6.10已将先前默认的bashshell更换为了dash。其表现是/bin/sh链接到了/bin/dash而不是传统的/bin/bash。
bash - GNU Bourne-Again SHell
dash - Debian Almquist Shell
可以分别man bash / man dash看一下。
那么怎么把sh改为指向bash呢?
最暴力的方法当然是直接把/bin/sh的软链接改到bash中,
如:ln -s /bin/bash /bin/sh
但是,有优雅一些的方法,
sudo dpkg-reconfigure dash
出现菜单问你是否要dash的时候,选no就可以了。
再次检查一下, ls /bin/sh -al 发现软链接指向/bin/bash就可以了。
相关阅读:
Ubuntu 的 bash和dash的区别 http://www.linuxidc.com/Linux/2012-03/57493.htm
Ubuntu Shell引发编译问题 http://www.linuxidc.com/Linux/2013-10/91099.htm
更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2
0 0
- ubuntu下shell脚本运行异常:bash和dash的区别
- ubuntu下shell脚本运行异常:bash和dash的区别
- ubuntu下shell脚本运行异常:bash和dash的区别
- Ubuntu下shell脚本运行异常:bash和dash的区别
- Ubuntu下shell脚本运行异常:bash和dash的区别
- Ubuntu shell脚本:bash / dash
- Ubuntu的shell之bash和dash
- Ubuntu的shell之bash和dash
- Ubuntu的shell之bash和dash
- Ubuntu的shell之bash和dash
- Ubuntu的shell之bash和dash
- Ubuntu的shell之bash和dash
- Ubuntu 的 bash和dash的区别
- buntu下shell脚本运行异常:bash和…
- Ubuntu系统下bash和dash的区别(修改默认sh为bash)
- 嵌入式linux:Ubuntu系统下bash和dash的区别(修改默认sh为bash)
- bash和dash的区别
- bash和dash的区别
- Android动画常用公共属性详解
- 译--ToolBar(四)
- Windows DLL编程中的导入导出:__declspec(dllimport) ,__declspec(dllexport) ,
- NGUI PK UGUI
- Quartz Configuration Reference
- Ubuntu下shell脚本运行异常:bash和dash的区别
- 双亲委派模型的工作过程
- 谷歌注册失败 手机已多次注册
- 把截取的视频做成Gif格式(Gifrocket)
- java环境变量配置
- iOS 指纹锁Touch ID解锁
- C++的值调用和引用调用
- 划分树
- linux内核部件分析之----设备驱动模型之device