Ubuntu 的 bash和dash的区别

时间:2023-01-04 15:33:51

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

Ubuntu 的 bash和dash的区别的更多相关文章

  1. Ubuntu下shell脚本运行异常:bash和dash的区别

    Ubuntu下我用bash到语法写了一个shell脚本(准确的说是把书上的脚本敲进电脑),在ubuntu下,用sh test.sh来运行,但是出现了意料之外到结果,比如echo -e "\n ...

  2. Ubuntu切换默认sh为bash或者dash

    Ubuntu切换默认sh为bash或者dash   1 bash与dash 从Ubuntu 6.10开始,默认使用dash(theDebian Almquist Shell)而不是bash(the G ...

  3. bash和Bourne_shell的区别

    Linux 中的 shell 有很多类型,其中最常用的几种是: Bourne shell (sh).C shell (csh) 和 Korn shell (ksh), 各有优缺点.Bourne she ...

  4. linux bash 和 sh的区别

    详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt189 Linux 中的 shell 有很多类型,其中最常用的几种是: Bou ...

  5. bash, sh, dash 傻傻分不清楚

    原文链接,转载请注明出处: http://www.happycxz.com/m/?p=137 常见shell类型 Bourne shell (sh) UNIX 最初使用,且在每种 UNIX 上都可以使 ...

  6. 当运行docker run -i -t ubuntu /bin/bash时,提示报错Error response from daemon: EOF?

    可能是下载过程中出现错误,重新执行docker pull ubuntu,在执行docker run -i -t ubuntu /bin/bash就OK了.

  7. bash、dash(/bin/bash和/bin/sh)的区别

    Linux中的shell有多种类型,其中最常用的几种是Bourne   shell(sh).C   shell(csh)和Korn   shell(ksh).三种shell各有优缺点. Bourne ...

  8. Ubuntu的shell之bash和dash

    Ubuntu的 shell 默认安装的是 dash,而不是 bash. 运行以下命令查看 sh 的详细信息,确认 shell 对应的程序是哪个: $ls -al /bin/sh dash 比 bash ...

  9. ubuntu中环境变量文件/etc/profile、.profile、.bashrc、/etc/bash.bashrc之间的区别和联系

    一 /etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置.所以如果你有对/etc/pr ...

随机推荐

  1. 关于SQL Server将一列的多行内容拼接成一行的问题讨论

    http://blog.csdn.net/rolamao/article/details/7745972 昨天遇到一个SQL Server的问题:需要写一个储存过程来处理几个表中的数据,最后问题出在我 ...

  2. linux学习笔记2-命令总结2

    权限管理命令  chmod 其他权限管理名  chgrp  chown  umask ========================================================= ...

  3. Facebook IV Winner's Interview: 1st place, Peter Best (aka fakeplastictrees)

    Facebook IV Winner's Interview: 1st place, Peter Best (aka fakeplastictrees) Peter Best (aka fakepla ...

  4. iOS 自定义导航栏笔记

    一.UINavigationBar的结构 导航栏几乎是每个页面都会碰到的问题,一般两种处理方式:1.隐藏掉不显示 2.自定义 1. 添加导航栏 TestViewController * mainVC ...

  5. Dynamics CRM 2015-Form之添加Ribbon Button

    说到在CRM Form上添加Ribbon Button,那就不得不提到一个Tool:Ribbon Workbench,使用这个Tool,能为我们添加button带来不少便利. Ribbon Workb ...

  6. 内嵌的Component调用外部的方法

    如果一个内嵌的Component控件需要调用外部定义的方法,用outerDocument.方法名来调用,前提是该方法是public的.如:<mx:DataGridColumn headerTex ...

  7. ajax得到后端数据一直提示为&lbrack;object Object&rsqb;解决方法

    前段ajax <script type="text/javascript"> function requestJson() { $.ajax({ type : &quo ...

  8. python3 &plus; selenium 运行过程中进行截图

    使用driver.get_screenshot_as_file方法("D:/aaac.png")括号中为需要存放的路径及图片名称 from selenium import webd ...

  9. 网上流行的linux内核漫画

  10. C&num;读取excel文件提示未在本地计算机上注册&OpenCurlyDoubleQuote;Microsoft&period;ACE&period;OLEDB&period;12&period;0”提供程序

    错误描述: 在VS2010执行读取excel文件时,报错"未在本地计算机上注册"Microsoft.ACE.OLEDB.12.0"提供程序" 业务代码: //下 ...