How to Install Fish Shell on Ubuntu

Fish is a featureful shell for Linux. Learn to install its latest version on Ubuntu.
Warp Terminal

Using the Fish shell is one of the many ways you can elevate your terminal experience in the terminal.

But before you make the switch, let me remind you that fish shell is not POSIX-compatible and it handles a few operations differently.

In simple terms, some tasks on fish are different than bash (the default shell of bash) so make sure you know how fish is different than the bash shell.

Once you learn the difference, you can use any of these two methods of installing Fish Shell in Ubuntu (which I'll be sharing in a moment):

  • Using the default repository (easy)
  • Using fish PPA (contains extra steps but gets the latest version)

Let's start with the easy one.

Install Fish Shell using the default repository

This is the easiest method of installing the fish shell where all it takes is one simple command and that's it.

The only downside of this method is you get a little older version.

If you don't mind using a slightly older version, then, execute the given command:

sudo apt update && sudo apt install fish

Once done, you can check the installed version of fish using the following command:

fish -v
install fish shell using the ubuntu repository

While writing, it gave me fish shell version 3.3.1.

You can start the fish shell just after installation by executing the fish command in the terminal prompt:

fish
Use fish shell in Ubuntu

To quit the fish shell, simply execute the exit command as shown:

exit
exit from the fish shell in Ubuntu

Install the latest version of the fish shell

If you want to get the latest version of the fish shell, then you'd have to use the fish shell's PPA for that purpose.

First, execute the following command to add PPA to your system:

sudo apt-add-repository ppa:fish-shell/release-3

Then, update your system repository to take effect from the changes you've made to your system:

sudo apt update

Once done, install the fish shell using the following command:

sudo apt install fish

Now, you can check the installed version:

fish -v
get the latest version of fish shell

As you can see, I'm running Fish version 3.6.4.

Make the Fish default shell

🚧
Using fish as a default shell may cause problems with the $PATH variable. Also, many distributions require a login shell to be Bourne-compatible.

Earlier, I explained how you can use the fish command to use the fish shell but it was temporary. But you can make it your default shell.

To change your default shell, all you have to do is use the chsh command as shown:

chsh -s /usr/bin/fish

Now log out and log back in. You will notice that fish is being used as a default shell.

Here's why fish is superior to bash

If anyone is switching from their comfort zone (bash in this case), they must have a strong reason to do so, and guess what? I have 11 reasons why.

Here are 11 reasons why fish is better than the bash shell:

11 Fish Shell Features That Make it More Awesome Than Bash
You should try Fish, even if you are vegan or allergic to seafood :P

Let me know what was your reason for making a switch.

About the author
Sagar Sharma

Sagar Sharma

A software engineer who loves to write about his experience with Linux. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.

It's FOSS

Making You a Better Linux User

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.