11

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,474

2 Answers2

25

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,474
1

In Ubuntu 22.04 and newer, sudo dpkg-reconfigure dash longer works. This option is removed since dash 0.5.11: Stop using debconf to select the default /bin/sh.

Instead you can do it with chsh.

muru
  • 207,228
nobody
  • 5,792