Ubuntu系统下bash和dash的区别(修改默认sh为bash)



   

什么是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 看看

结果是: /bin/sh -> dash

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

 

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

sudo dpkg-reconfigure dash

然后选择【否】

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

结果是: /bin/sh -> bash

修改成功!

 

   

什么是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 看看

结果是: /bin/sh -> dash

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

 

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

sudo dpkg-reconfigure dash

然后选择【否】

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

结果是: /bin/sh -> bash

修改成功!

 

  • 5
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值