微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Ubuntu 的 bash和dash的区别

什么是bash ?

Bash(GNU Bourne-Again Shell)是许多Linux平台的内定Shell,事实上,还有许多传统UNIX上用的Shell,像tcsh、csh、ash、bsh、ksh等等,Shell Script大致都类同,当您学会一种Shell以后,其它的Shell会很快就上手,大多数的时候,一个Shell Script通常可以在很多种Shell上使用

什么是dash ?

dash is the standard command interpreter for the system.  The current

version of dash is in the process of being changed to conform with the

POSIX 1003.2 and 1003.2a specifications for the shell.

先用命令ls -l /bin/sh 看看

ls -al /bin/sh
lrwxrwxrwx 1 root root 4 Mar 5 15:21 /bin/sh ->dash

我们会发现Ubuntu认采用的是 dash

如果要修改认的sh,可以采用命令

sudo dpkg-reconfigure dash

然后选择【否】

成功后再执行ls -l /bin/sh 看看

ls -al /bin/sh
lrwxrwxrwx 1 root root 4 Mar 5 15:22 /bin/sh -> bash

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐