2

Some said that Ubuntu 14.04's default shell is dash. Mine is bash.

My /bin/sh is dash.

I don't remember if I changed the default shell. What is some way to change the default shell? Can I find out if I have done that?

Thanks.

Tim
  • 101,790

2 Answers2

9

There are different meanings of the phrase "default shell".

The default shell for /bin/sh scripts is whatever shell is installed as /bin/sh. In Debian derivatives, including Ubuntu, this is Dash. On most other Linux distributions, it's Bash (except in embedded distributions where it could be Busybox). On Unix systems it's likely something else. On Debian derivatives, you can switch between Dash and Bash as the default /bin/sh by running dpkg-reconfigure dash as root.

The default shell for users is whatever is set in their NSS entries (typically, their line in /etc/passwd, or their LDAP entry). Users can change this using chsh(1), and the default used when users are created depends on the tool used (for adduser(8), it's defined using DSHELL in /etc/adduser.conf). On most Linux distributions (including Debian derivates) the default shell for users (the default interactive shell) is Bash.

Stephen Kitt
  • 434,908
2

You can see what is the effective shell by calling the SHELL constant echo $SHELL

Here is Ubuntu's wiki on the topic.

For example use this past post as a guide sheet if you want to change the shell.

This is surely a duplicate question, but I'd like to propose the answer in case it helps you out, evolves to something new, or specific to Ubuntu 14.04. In general terms you'll find it all over Stackexchange that dash is the Debian adaptation of the Almquist shell, and is the default shell, although bash is commonly used.