Sometimes, you just want to switch to a better shell for your terminal - like fish.


Here’s a quick run through of how to change your default login shell which assumes you understand the basics of the command-line on Unix-like systems. These instructions are exemplified on an Ubuntu 20.04 system for the fish shell but this works just the same for any shell on *BSD, Linux, and macOS.

  1. Install the fish package.

    sudo apt -y install fish

    This Debian package installs the fish executable in /usr/bin.

  2. Register /usr/bin/fish as a valid login shell by adding its path to /etc/shells.

    Debian provides a convenient add-shell command to accomplish this.

    sudo add-shell /usr/bin/fish

    On other systems, simply add the path manually.

    echo /usr/bin/fish | sudo tee -a /etc/shells
  3. Set the default login shell of the current user to fish.[1]

    chsh -s /usr/bin/fish


Nice and simple, right? It should be a piece of cake to change your login shell now.