1

Just installed a virtual machine via virtualbox yesterday and I'm having trouble switching the shell from dash to bash. I've tried chsh as well as modifying the file directly, but it still defaults to dash.

Even worse yet, if I call the shell variable I get this:

$ echo $SHELL
/bin/sh

So even though I'm clearly using dash, the environment variable thinks that I'm using bash. What's going on here?

Anybody have any ideas of what I could do to remedy this problem? I mean I could just type in bash every time I open up a terminal, but that's not preferred.

closed as unclear what you're asking by G-Man, steeldriver, RalfFriedl, Jeff Schaller, DarkHeart Dec 16 '18 at 11:24

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What exactly did you run for the chsh command, and what was the output, if any? What, also, is the result of getent passwd for your account? – Jeff Schaller Dec 15 '18 at 18:02
2

sh is not (necessarily) bash. Probably, your /bin/sh is a link to /bin/dash.

Did you try

sudo dpkg-reconfigure dash 

If yes, please give more details:

  • what exactly did you try?
  • you mention you modified a file directly. Which file?
  • what is in /etc/passwd?
  • Just ran dpkg-reconfigure on dash and /bin/sh is indeed a link to dash. I edited /etc/passwd to set the default shell for my main user as /bin/sh, but seeing as that was a redirect to dash I switched it over to /bin/bash like I should have in the first place. Although, now my default command line reads "sh-4.4$", I get my up arrow and autocomplete now but i'd like my host-name and username too. Any ideas how to bring those back as well? – Dakota Vaughn Dec 15 '18 at 17:57
  • The prompt is controlled by the PS1 variable. You can set that in your .bashrc to whatever you like. – WerKater Dec 15 '18 at 18:11

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