167

Is there a way to set fish as the default shell in ubuntu netbook remix? I put in my .bashrc to run fish, which works fine, but ubuntu recognizes it as fish running inside bash, which means that when I try to close the shell it warns me that a task is still running.

It doesn't pop up as a new application, so I can't pin it to my bar like a normal app.

muru
  • 207,228
Xodarap
  • 1,969

5 Answers5

257

You can set fish as your default shell by running

chsh -s $(which fish)

To do so for another user, just add the username at the end of the command, and use sudo.

Then log out and back in.

(To set it back to bash, you need to use Fish syntax of course, like this chsh -s $(which bash))

If you encounter a message saying something like:

chsh: /opt/homebrew/bin/fish: non-standard shell

You need to add fish to the list of standard shells first:

sudo -i
sudo echo "$(which fish)" >> /etc/shells
exit # to get out of root user
ajmitch
  • 18,999
42
usermod -s /usr/bin/fish username

Must be run as root though.

This will change the shell permanently for the specified user.

sweetfa
  • 1,181
31

I just added the line fish to the end of my .bashrc.

KD100
  • 461
24

I agree with the chsh is the correct answer. However:

If you run chsh and get error

/usr/local/bin/fish: non-standard shell

simply add the fish binary location to /etc/shells.

Found here.

A.B.
  • 92,125
jackbravo
  • 341
11

In /etc/shells, add /usr/local/bin/fish:

# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/usr/local/bin/fish

Then chsh -s /usr/local/bin/fish.

Dorian
  • 402