Command to Install fish shell on Ubuntu 20.04 LTS

Fish Shell is meant to be an interactive and user-friendly command-line shell, where, FISH stands for a friendly interactive shell. The advantage that the Fish Shell offers in scripting is the Ada/Modula-2-like syntax, which can lead to more readable texts in complex scripts. As with Bash, UNIX commands can be called in Fish scripts. Fish scripts can be used as executable programs after setting them to executable with chmod. Thus, tasks can be automated similar to bash scripts.

Key features of FISH- friendly interactive shell:

  • Commands are marked in color (syntax highlighting)
  • As you type, the characters for existing commands are added and suggested
  • Typos are displayed as you type
  • The command-line completion (tab completion) lists the possible commands including a short functional description, provided there is a description line from a man page.
  • The execution of calculations at shell level is possible with up to six decimal places

Steps to install and use Fish Shell on Ubuntu Linux

Download Fish Shell

We don’t need to add any third-party repo, the packages to install Fish are already there on Ubuntu’s default system repo:

sudo apt install fish

 

Switch to Fish

Once the installation is completed, you can start using it by switching your current shell to Fish, for that type-

fish

install and use Fish Shell on Ubuntu Linux

Set Fish as Default shell

After using some time, if you like this colorful and friendly shell, then you can set it system default instead of bash.

chsh -s /usr/bin/fish

Log out of your system and log in again to apply the changes.

 

Customization

To change Fish properties, we can create a configuration file-

nano ~/.config/fish/config.fish

 

Switch back to Bash

If you didn’t like Fish and want back your Bash again on the terminal, then run

chsh -s /usr/bin/bash

log out and log in again.

To learn more about this shell command see the official documentation.

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.