Fixing the default shell in Ubuntu / Linux Mint


Several years ago, the Ubuntu developers made a horrible decision to make dash the default shell instead of bash. This breaks numerous shell scripts, and I recently discovered it also broke one of my own Ruby scripts that depended on bash’s signal handling. The problem here was that when a TERM signal is sent to dash, it doesn’t kill off its child processes.

The problem isn’t fixed by making bash the login shell for a particular user, because some programs (such as Ruby) invoke /bin/sh, which is a symlink to /bin/dash. The fix for this problem is to make bash the default shell on a system-wide basis. The following command does that:

sudo dpkg-reconfigure dash

When you are asked whether to install dash as /bin/sh, answer No. This will update the symlink, among other things.


I am a g33k, Linux blogger, developer, student and Tech Writer for My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.