什么是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. 图片转成Base64

    var img = "imgurl";//imgurl 就是你的图片路径 function getBase64Image(img) { var canvas = document. ...

  2. springmvc核心技术

    目录 异常处理 类型转换器 数据验证 文件上传与下载 拦截器 异常处理 Spring MVC中, 系统的DAO, Service, Controller层出现异常, 均通过throw Exceptio ...

  3. 关于在UNIcode环境下得TCHAR转string类型以及string转TCHAR

    using namespace System::Text: String ^TCHARtoStr(TCHAR *temp) //TCHAR转String { array<unsigned cha ...

  4. C#中dll调用方法

    我不创造方法,只做方法的搬运工. https://www.cnblogs.com/Asuphy/p/4206623.html

  5. React-Error

    1. react创建一个单页应用,官网给的命令是ngx create-react-app my-project 2. window上表示,安装失败 3.解放办法:npm install -g crea ...

  6. Sorting a Three-Valued Sequence(三值的排序)

    Description 排序是一种很频繁的计算任务.现在考虑最多只有三值的排序问题.一个实际的例子是,当我们给某项竞赛的优胜者按金银铜牌序的时候. 在这个任务中可能的值只有三种1,2和3.我们用交换的 ...

  7. 阿里巴巴开源项目汇总-(JAVA)

    来源:https://segmentfault.com/a/1190000017346799 1.分布式应用服务开发的一站式解决方案 Spring Cloud Alibaba Spring Cloud ...

  8. 所有不同的序列串-----LCS算法的变种

    今天遇到LEETCODE的第115题: Distinct Subsequences Given a string S and a string T, count the number of disti ...

  9. c++错误

    run-time check failure #2-stack around the variable 'c' was corrupted错误产生的原因大多是因为程序定义了数组,存在数组越界.解决办法 ...

  10. 2016/12/22 dplの课练

    1.sort -nk 1 -t - 3 2.sort -nk 1 -t - 2 3.sort -nk 2 -t - 1 3./etc/passwd根据用户id的大小排序,从小到大的排序输出 sort ...