How to Install Fish Shell on Ubuntu
Learn to install the latest version of Fish shell on Ubuntu. Also learn to make it the default shell instead of bash.
Switching to a modern shell is one of the easiest and most effective ways to elevate your terminal experience. And Fish is one of the best shells available in the market.
But before you make a switch from bash (the default shell on Ubuntu) to fish, make sure to learn a few things which fish handles differently than bash.
Once you know the compatibility difference between bash and fish, you can refer to any of two methods to install fish on Ubuntu:
- Using the default repository (stable bit not always the latest version)
- Using fish PPA (for the most recent version of fish)
While writing, the default repository gave me fish shell version 3.7.0 and the PPA method gave me the fish shell version 3.7.1.
Install fish shell using the default repository
This is the easiest way you can install fish shell on Ubuntu as it does not require any additional steps.
The only drawback of using the default repository is that you get an older version of fish than the other method. Which should not be a problem for most users.
sudo apt update && sudo apt install fish
Once done, you can verify the installation by checking the installed version of fish:
fish --version
As you can see, it gave me fish shell version 3.7.0.
Install the latest version of Fish Shell in Ubuntu
If you want to get the most recent version of Fish Shell in Ubuntu, then using the Fish Shell PPA can get you there with the least effort possible.
To install the latest version of fish shell, first add the fish shell PPA using the following command:
sudo apt-add-repository ppa:fish-shell/release-3
Now, update the repository index to take effect from the added repository:
sudo apt update
Finally, install the fish shell using the following:
sudo apt install fish
You can check the installed version of fish using the following:
fish --version
As you can see, it gave me fish shell version 3.7.1.
Make fish the default shell
Like me, if you also find fish shell overall a better shell compared to bash, then it can be made your default shell. To do so, execute the following command:
chsh -s /usr/bin/fish
There you go!
To go back to using bash ad default, use:
chsh -s /usr/bin/bash
More reasons to love Fish shell
Fish gives you several productivity features like auto-complete and auto-complete out of the box which is a plus compared to shells like zsh which require extra plugins and configuration for this.
Well, here are several other reasons why I love using Fish:
I hope you will find this guide helpful and if you have any queries, feel free to leave us a comment.