2

I was playing around with fish shell on my Ubuntu but wanted to switch back to bash. I tried running

chsh -s /bin/bash

but that didn't work, I got some error, which IIRC was regarding permissions, so I tried doing

sudo chsh -s /bin/bash 

That seemed to work and didn't show any errors. So I proceed to try logging out and logging back in to see the effects of this change. But from then on, every time I try opening the terminal, it would just immediately close.

Does anyone know what I did wrong?

4
  • Perhaps the symlink in broken... Have a squiz here: unix.stackexchange.com/questions/25423/how-to-reinstall-bin-sh
    – kwaka
    Jan 23, 2017 at 8:56
  • What error you got while doing chsh -s /bin/bash?
    – heemayl
    Jan 23, 2017 at 9:54
  • I managed to solve it! Turns out it was an error with fish shell and it just crashed every time I tried opening the terminal. I have added my process in the question. Thanks everyone!
    – Zinthos
    Jan 23, 2017 at 18:39
  • @Zinthos Rather providing solution in question section, you can post answer of your own question.
    – d a i s y
    Jan 25, 2017 at 8:14

1 Answer 1

2

Managed to solve this myself. Allow me to explain:

I went to virtual console with ctrl + alt + F1 then tried logging in there, but same issue happened, I was a quick message pop up and I was back to login stage in the virtual console. The message went by way too fast so but I managed to grab it my camera.

It turns out it was an error with fish shell: (not exactly sure if how I caused this error)

fish: relocation error: fish: symbol _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7reserveEm, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

So this told me that fish shell was still my default shell script sudo chsh -s /bin/bash did not do the trick for me. I was able to further confirm this by checking /etc/passwd and saw that my user still has /usr/bin/fish and fish was broken somehow which caused the terminal to immediately close. Finally found the root of the problem!

I then proceed to edit my passwd file by running bash from grub as root following instructions from here: https://unix.stackexchange.com/a/282141/212011 where I simply find the line with my username and changed /usr/bin/bash back to /bin/bash and then it was all good again!

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.