1
I restarted my kubuntu machine - from the menu leave->restart
if that matters. Normally my terminal windows are brought up automatically after a reboot but this time my prompt was wrong and a bunch of other bizarre things.
Now /bin/sh is a link to /bin/dash and dash seems to have been loaded but suddenly it is a lot dumber than it was before the reboot. Now it doesn't recognize what shopt
is. When I try to dot execute my profile (. ~/.bash_profile
) I get error like /bin/sh: 28: /etc/bash_completion: [[: not found
. On the command line command completion does not work nor the up & down keys for command history.
I have not knowingly downloaded any packages that should have messed with this. Is there a valid reason why this should suddenly start happening.
Now I executed /bin/bash
from the command lines of my terminals and all seems to be well but this does not explain what is wrong with dash
. Also bash
is allegedly heavier than dash and since I open 20 or so terminals I would like to avoid that overhead if it is true.
Thank you for any insights into this.
[[
is and has always been bash only. It's an internal command (unlike[
, which is a binary). – Dennis – 2012-12-28T03:19:47.783Dash is a lighter version of bash so I assume the same applies. There has been no changes to my system to account for the above - at least of which I am aware. – Newton Falls – 2012-12-28T03:21:43.910
1
[[
works in bash and ksh, but not in dash. I've tested it on my system to verify. This presentation agrees. I'm not sure what changed on your system, but[[
cannot work with dash. The rest of your problems should be due to the fact that.bash_profile
can't be sourced. – Dennis – 2012-12-28T03:27:54.323Thank you. I don't know what happened. I may just change the /bin/sh link to point to bash and be done with it. – Newton Falls – 2012-12-28T03:39:03.033
My best guess is that this is what happened in the first place. Changing
/etc/passwd
is more stable and prevents non-interactive shells from using Bash by default (it is heavier, after all). – Dennis – 2012-12-28T03:42:16.470