Fish Shell also known as ‘Friendly interactive shell’ used for Unix/Linux-like operating distributions. It provides a smart, fully equipped, and user-friendly command-line environment for all Linux users. Fish shell supports various features unlike any other shell such as autosuggestion, Tab completion, syntax highlighting, Sane Scripting, Glorious VGA Color, and web-based configuration. Using this interactive shell environment, you do not need to remember a bunch of Linux commands because it is more productive and comes with various handy features.

We will talk about the installation of interactive Fish Shell on CentOS 8 in this tutorial. The same steps apply to Rocky Linux and AlmaLinux too.

Fish shell installation on CentOS 8

We will provide the following two different methods for the installation of Fish shell on the CentOS 8 system:

  1. Install Fish shell using Yum repository
  2. Install Fish shell by adding official Fish shell repository

Method 1: Install Fish shell using Yum repository

In most Linux systems including CentOS 8, the Fish shell is available in the default system repository. Therefore, you can easily install the interactive Fish shell environment on CentOS 8 using the yum repository by running the below-mentioned command:

$ sudo yum install fish

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

The above command will install fish shells including all their dependencies on your CentOS system. Press ‘y’ and then hit ‘Enter’ for continuing the installation process.

Once the installation of the Fish shell is completed, display the installed version by using the following command:

$ fish --version

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

Method 2: Install Fish shell by adding the official fish shell repository

The alternative method by adding a Fish official repository is also available for the installation of a Fish shell on CentOS 8. So, add the Fish repository to your system by executing the following command:

$ sudo dnf config-manager --add-repo https://download.opensuse.org/repositories/shells:/fish:/release:/3/CentOS_8/shells:fish:release:3.repo

Once you setup the Fish repository, start installing the Fish shell using the below-mentioned command:

$ sudo dnf install fish

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

The above command will automatically import the GPG key of the Fish repository. Press ‘Y’ and then hit ‘Enter’ to move ahead.

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux Advertisement

Congratulations! Fish Shell is installed on your CentOS 8 system successfully.

Start Fish Shell Environment

To access the interactive fish shell, just type the below-mentioned command on the terminal window:

$ fish

The following shell prompt will display on the terminal where you can easily type commands.

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

Fish shell offers the following features:

  • Tab completion: For example, type the desired command and then press the ‘Tab’ to show all relevant commands.
  • Syntax highlighting: it will highlight the invalid syntax of the command with red color.
  • Autosuggestion: When you type a few words of a command and then it will auto-suggest the command in grey color that is recently used.  To grab this command option press ‘Left arrow key’.

Print a message using fish shell by using the following command:

$ echo Hello welcome to Vitux.com

Similarly, you can also display the current date and time using this shell. The following command will auto-suggest on the terminal:

$ timedatectl

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

Fish shell web interface configuration

Fish shell offers various functionalities through the web interface. To enable the web configuration, type the following command on the shell as follows:

$ fish_config

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

The following window will open in your web browser:

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

To exit from the shell environment, press ‘Ctrl c’.

To get help related to Fish shell, type the below-mentioned command:

$ fish --help

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

Remove Fish Shell from CentOS 8

To uninstall Fish shell, issue the following command:

$ sudo dnf remove fish

How to Install Fish Shell on CentOS 8 and Rocky Linux 8 centos linux

Conclusion

We discussed two methods in this article for the installation of Fish Shell on CentOS 8 distribution. Both methods are useful and you can easily implement them on your system for installation. We also explore amazing features of the fish shell and see how to configure the web-based environment. You can explore more of its features and tutorials from the official fish shell website.