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