Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
What makes you think that dash is the default shell? –  jasonwryan May 3 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 at 4:29

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer
    
How/where do I check for the default non-interactive shell? –  AsheeshR May 3 at 4:32
    
@AsheeshR Look in /bin/, you'll see the link: sh -> dash... –  jasonwryan May 3 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 at 9:44
3  
@JosephR. that sounds like a bug. –  jasonwryan May 3 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 at 19:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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