0

Something broke my fish and I have no idea how to fix it so is there a way to change shell to zsh without using the command line

4
  • 1
    Use gedit or another GUI editor and change the shell in /etc/passwd. Alternatively, boot Live media and edit /etc/passwd. Commented Feb 4, 2021 at 6:37
  • thanks, that worked
    – bonsoir
    Commented Feb 4, 2021 at 7:01
  • @berndbausch Editing /etc/passwd manually is a bad idea. If you make a mistake, it can be very difficult to recover. Commented Feb 4, 2021 at 17:09
  • I know one should not edit the passwd file. Right now, however, OP is already in a difficult to recover situation. Commented Feb 5, 2021 at 0:04

2 Answers 2

1

Something broke my fish

It's probably your fish configuration file. Use a GUI (e.g. a file browser) to rename ~/.config/fish to a different name. That means navigate to your home directory, then to the .config subdirectory, and then rename the fish entry to fish.save.

Alternatively, configure a terminal emulator to open a different shell. Most fancy-GUI terminal emulators let you set up profiles with different settings such as which command to run. Arrange to use another shell, for example zsh, while you fix fish.

Alternatively, use your desktop environment's "launch program" feature and tell a terminal emulator to run a different command, for example xterm -e zsh or gnome-terminal -e zsh or whatever terminal emulator you want.

If you want to change your login shell from fish to zsh, run the chsh command in the terminal. (Without sudo! It needs to run from your own account.) Alternatively, this can be done from most desktop environments' user administration panel.

0

There are more than one places the default shell of a user may be stored in a system. The default location, on a fresh installed linux system, probably will be the file /etc/passwd.

This file includes all the users of your operating system. Each line, contains information separated by a colon (:). The last part of each line represents the default shell of the user. This is the place you are looking for.

In order to edit this file without using command line, I suggest two different ways:

  • You may boot from a Live CD, like ubuntu and edit the file /etc/passwd located in your disk.
  • If you can't boot from a live cd, you may unplug your disk from your computer or laptop and plug it in another computer. After mounting it, you will be able to find and edit the file.
2
  • That "this file" being /etc/password. On your run-of-the-mill system, without LDAP or such..
    – ilkkachu
    Commented Feb 4, 2021 at 8:29
  • You are correct, I update the answer. Preoccupied with a single leaf, you won't see the tree. Commented Feb 4, 2021 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .