Change Ubuntu 18.04 default dash shell to bash.

less than 1 minute read

Ubuntu 18.04 uses Dash as the default shell. Previously, Ubuntu 10.04 - 17.04 had the default shell as Bash. Dash startup time is faster due to the 93% smaller codebase vs. Bash. Dash also may be less likely to have security vulnerabilities due to the smaller codebase.

How to specify shell to run script

The shell is selectable in the shebang at the top of the .sh file. here is an example .sh file


[[ 1 -eq 0 ]] &&  { echo true; }  || { echo false; }

In Dash this script will simply crash due to incompatible syntax, but Bash runs this happily.

Typically it will be


Which just means use any shell installed

If your script is more complicated, you might consider using shebang


if appropriate.

Leave a Comment