Although many users may not know it, bash is the default shell in many Linux distributions. However, thanks to the great customizability of Linux, we can change this by installing a new one. So if you continue reading this post, you will learn how to install Fish on Ubuntu 20.04.
Fish is a smart and user-friendly command-line shell for Linux, macOS, and the rest of the family.
Some of the main features of Fish are
- Autosuggestions: fish suggests commands as you type based on history and completions, just like a web browser.
- Fish is fully scriptable.
- its syntax is simple, clean, and consistent.
It is a well-equipped, intelligent, and easy-to-use shell for Unix-like systems. With it, we don’t have to deal with complicated configurations and installing extra add-ons or plugins.
For a few Ubuntu releases now, Fish has been included in the official repositories. This makes installation quick and easy.
So, open a terminal from the main menu or by pressing the keys
CTRL + ALT + T and update the system.
sudo apt update sudo apt upgrade
After that, you can install Fish by running the following command:
sudo apt install fish
After that, you can use the shell by running the command
Although the above method is effective, easy, and secure, it has the problem of not providing us with the latest stable version. This can be a problem for some users who require the latest version of Fish.
To avoid this, the developers of Fish have provided a PPA that we can use.
So, add the fish PPA by running:
sudo apt-add-repository ppa:fish-shell/release-3
Then refresh APT:
sudo apt update
And finally, update or install the latest version of fish by running
sudo apt install fish
A look at Fish Shell
As soon as you execute the fish command you will be using the shell.
It is a very simple and easy-to-use command interpreter if you are adapted to Bash.
One of the improvements is that as you start typing commands, it will suggest the options that you might use.
But not only that but also thanks to the color support, you can differentiate the commands and their use.
Another nice feature of Fish is that when we are typing a command by pressing the tab key we can see the available options.
The main difference with bash is that it does not interfere with the command and we can continue using it without retyping anything.
And you can use it without any problem.
Several shells can coexist in a Linux operating system, but the default is
Bash. Of course, this can be changed by running the following command:
chsh -s /usr/bin/fish
This way, we will have it by default when we log in. In case we are doing this via SSH the changes will be reflected in the next login.
If you want to go back to
Bash, then you can execute this one:
chsh -s /bin/bash
To uninstall Fish you can do it via APT:
sudo apt remove fish
and this way there will no longer be any trace of this program on your system.
If you have added the PPA then you also have to remove it from the system:
sudo apt-add-repository --remove ppa:fish-shell/release-3
It’s as simple as that.
Fish wants to improve bash and make it a more up-to-date command interpreter with key functions so that we can feel more comfortable using the terminal. Despite being a key component of the system, it is easily installable on Ubuntu 20.04.