Tag: Run enter to toggle its dash Linu ECIF spec system
Ubuntu Toggle default sh for bash or dash1 bash and Dash
Starting with Ubuntu 6.10, the default is to use Dash (Thedebian almquist shell) instead of bash (the Gnubourne-again shell).
But the login shell is bash. The reason is that dash is faster and more efficient, and it complies with the POSIX specification. Ubuntu runs a lot of shell scripts when it starts up, and using dash can speed up startup.
1.1 What is bash?
Bash (GNU bourne-again shell) is the default shell for many Linux platforms, and in fact, there are many other shells used on Unix, like Tcsh, CSH, Ash, BSH, Ksh, and so on, shell script is roughly similar, When you learn a shell, the other shells will quickly get started, and most of the time, a shell script can often be used on many kinds of shells.
1.2 What is 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.
2 Toggle Bash and dash2.1 view and use
Take a look at the command first ls -l /bin/sh
/bin/sh, Dash
We'll find out that Ubuntu is using Dash for default
2.2 Toggle SH to bash
If you want to modify the default sh, you can use the command
sudo dpkg-reconfigure Dash
Then select No
Execute after success
Ll/bin/sh
The result is:/bin/sh -> bash
Modified successfully!
2.3 Toggle sh for Dash
Of course we can also use
sudo dpkg-reconfigure Dash
Change the sh back.
3 links
The syntax difference between dash and bash
Ubuntu Toggle default sh for bash or dash