Changing the default Ubuntu 12.04 shell from /bin/bash to /bin/dash

164 views
Skip to first unread message

Mwaoshe Njemah

unread,
Nov 9, 2013, 6:06:37 AM11/9/13
to nairo...@googlegroups.com
Not sure why I hadn't posted this to the list earlier.
I installed an Ubuntu 12.04 image on Digital Ocean a couple of weeks back.
Straight away I noticed a few things were awry.
For instance after adding an user, I realized SSHing into the instance as the user did not drop me into the user's home dir. In fact there was no home dir for the user.
After creating the user's home dir, I then realized that tab autocomplete wasn't available, which I found extremely annoying.
I cloned a .bashrc file I use on another Ubuntu 12.04 instance, and had been attempting to source it for weeks now.
Just this morning, I realized that source which is a built-in  Bash  command, wasn't available on my Shell. For reasons I can't comprehend, Ubuntu changed the default from /bin/bash to /bin/dash on the latest Ubuntu.
On the Bourne shell ". file" ought to source a file.
Except on my instance " . .bashrc" gets me the "file does not exist" error.
Long story short, I need a way to revert my default shell from /bin/dash to /bin/bash. Any pointers?

Xmir and Unity,

--
Mwaoshe Njemah

Alan Orth

unread,
Nov 9, 2013, 6:23:18 AM11/9/13
to nairo...@googlegroups.com
Njema,

You can just edit it in /etc/passwd, or use the `chsh` command.

Alan
> --
> You received this message because you are subscribed to the Google
> Groups "Nairobi GNU/Linux User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to nairobi-gnu...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
Alan Orth
alan...@gmail.com
http://alaninkenya.org
http://mjanja.co.ke
"I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone." -Bjarne Stroustrup, inventor of C++


signature.asc

rso...@gmail.com

unread,
Nov 9, 2013, 7:04:37 AM11/9/13
to nairo...@googlegroups.com
You can just edit it in /etc/passwd, or use the `chsh` command.

Alan


New users will still have dash assigned as the default shell. Furthermore all shell scripts that have "/bin/sh" as default interp. will end up being run by dash.  Stuff will break.  I advise changing the system-wide default shell.  Permafix for this is : "dpkg-reconfigure dash" which will give you the option of removing it as the system wide default shell.

BTW if you're looking at cloud I'd also strongly recommend Angani (www.angani.co) which is a local company that provides VMs for a reasonable price.  I use them for one of my projects and the in-country latency is impressively low.


Mwaoshe Njemah

unread,
Nov 9, 2013, 7:52:47 AM11/9/13
to nairo...@googlegroups.com
Thank you Sohan will attempt your suggested solution.


--
You received this message because you are subscribed to the Google Groups "Nairobi GNU/Linux User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nairobi-gnu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Mwaoshe Njemah
Twitter/Identi.ca/IRC: nj3ma
Skype: moshe.njema
http://moshe.me.ke
+254733665577 | +254722991918 | +254770364444
w w w . n e t i v i t y . c o . k e

"I would have written a shorter letter, but I did not have the time."
Blaise Pascal

Dennis Mungai

unread,
Nov 10, 2013, 3:48:01 AM11/10/13
to nairo...@googlegroups.com
Hey Njema and Rohan,

That solution works.
Ubuntu Server 13.10 also switched to /bin/dash as the default shell, and to undo the damage,

dpkg-reconfigure dash

Does the trick.

See attached images for results.
Please avoid sending me Word or PowerPoint attachments.

See http://www.gnu.org/philosophy/no-word-attachments.html

Screenshot from 2013-11-10 10:40:09.png
Screenshot from 2013-11-10 10:41:52.png

Mwaoshe Njemah

unread,
May 13, 2014, 12:14:37 PM5/13/14
to nairo...@googlegroups.com
For some reason  "dpkg-reconfigure dash" did not do the trick. I have had to call up bash everytime.
I just attempted "chsh" and changed the login shell to /bin/bash. I hope this works.


Reply all
Reply to author
Forward
0 new messages