As per documentation, dash should be the default shell in Debian Wheezy, however when I open up a terminal and check the SHELL variable, it points to /bin/bash. Since this is a fresh install, and I have not made any changes, why is this not pointing to /bin/dash? Or is the default shell stored or pointed to by some other variable?

  • What makes you think that dash is the default shell? – jasonwryan May 3 '14 at 4:27
  • @jasonwryan Since it executes scripts faster than bash, and has fewer library dependencies (making it more robust against software or hardware failures), it is used as the default system shell on Debian systems. From the Wheezy dash package page. – asheeshr May 3 '14 at 4:29

According to the documentation, the default /bin/sh shell is dash, but the default interactive shell is bash:

The default interactive shell is bash (it's defined in /etc/adduser.conf then copied to the user profile, see chsh(1) manpage).

System scripts with the POSIX shebang will be run by dash, but when you--the user--open an interactive shell, it will be /bin/bash unless you elect to change it.

  • How/where do I check for the default non-interactive shell? – asheeshr May 3 '14 at 4:32
  • @AsheeshR Look in /bin/, you'll see the link: sh -> dash... – jasonwryan May 3 '14 at 4:36
  • 1
    Interestingly enough, if you open /etc/default/useradd you find that SHELL=/bin/sh so that any user account created with useradd will have dash as their default shell! – Joseph R. May 3 '14 at 9:44
  • 3
    @JosephR. that sounds like a bug. – jasonwryan May 3 '14 at 10:03
  • @jasonwryan Good point. I'm currently swamped but I'll report it as soon as I have time and post a link here. In the meantime, feel free to report it if I haven't. – Joseph R. May 3 '14 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.