Ubuntu Transition: Dash vs. Bash

To accelerate boot times, Ubuntu moved to using Dash (/bin/dash) as the default system shell (/bin/sh), replacing the more feature-rich but slower Bash. You can verify this linkage by checking /bin/sh -> /bin/dash.

While this is great for system performance, it can cause unexpected failures in shell scripts designed specifically with “Bashisms” (features unique to Bash). If you need to revert the default shell back to Bash for compatibility reasons, you can execute the following command:

sudo dpkg-reconfigure dash

When the configuration window appears, select ‘No’. This will point /bin/sh back to Bash. For those developing software or writing complex deployment scripts on Ubuntu, I strongly recommend sticking with Bash or ensuring your scripts are POSIX-compliant to avoid subtle bugs introduced by the Dash transition.


Comments & Feedback