I broke /etc/shells

I broke my /etc/shells file. When I want fish she’ll as default I accidentally run sudo cp -r /usr/bin/fish /etc/shells. Now I can’t login using my password, how to resolve that?

You need to use :enos: Live USB to chroot into existing system and fix that file

I have it, ad how to fix it?

It’s written in the link

  1. Login from USB live system

  2. Use arch-chroot to login into your “broken” installed system

  3. Manually fix that file

  4. Save

  5. Boot back to your system

I try remove the /etc/shells but not fix problem

I mean how to manually fix? Like command or something.

Well no…Just copy what’s inside that file from Live ISO system to installed for example.

Or here’s the original /etc/shells

# Pathnames of valid login shells.
# See shells(5) for details.


I copy it and change my password, but still can’t login

Maybe :thinking: some crash after sudo pacman -Syu?

What else did you do? Did you run the chsh command to change your shell to fish? I hope you didn’t do that, because that would be a really silly thing to do…

Yes I do that

Well, that is why you can’t login.

Well I do usermod -s /bin/bash [my username] and that’s fix the problem

Good! You understand now why that was a bad idea? :rofl:

Stop trying to change your user’s shell to fish. Instead, if you really want to use fish, change your terminal emulator settings to launch fish. Leave your user’s shell to be bash.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.