8

In Ubuntu, /bin/sh points to /bin/dash by default.

I want to use /bin/bash as my system-wide shell for /bin/sh. What is the best way to do this?

mkasberg
  • 1,314
  • 3
  • 12
  • 23

1 Answers1

21

As shown on this Ubuntu wiki page, you should run

sudo dpkg-reconfigure dash

and select the option not to use /bin/dash as the default shell. Making the change this way will not only fix the symlink /bin/sh, but will also configure other parts of your system to behave correctly, such as making sure that man sh points to the bash manpage instead of the dash one.

mkasberg
  • 1,314
  • 3
  • 12
  • 23
  • Good to know. At the risk of hitting some mined terrain here: What would be a use-case for this? – Sebastian Stark Aug 12 '18 at 22:36
  • 3
    It isn't terribly uncommon for certain software to require this. For example, building [Linux From Scratch](http://www.linuxfromscratch.org/) requires `/bin/sh` to point to `/bin/bash`. – mkasberg Aug 13 '18 at 15:05