How to Install Fish Shell on Debian 10

 

 

 

FIsh is an interactive and usable Unix shell. In Fish, features can be accessed by default, without having to configure them. Shells like Fish are considered exotic because they don’t strictly follow POSIX shell standards, which are up to the maintainers’ discretion.

 

 

This is an alternative shell that aims to be more interactive and user-friendly than other shells. Here, we will install Fish on a Debian 10.

 

 

 

 

Step 1: Configure VPSie cloud server

 

 

 

  1. Sign in to your system or register a newly created one by logging in to your VPSie account
  2. Connect by SSH using the credentials we emailed you.
  3. Once you have logged into your Debian instance, run these commands to update your system.
apt-get update && apt-get upgrade -y

 

 

 

 

 

 

Step 2: Install Fish

 

 

 

 

 

 

Follow the command below to install Fish.

 

 

sudo apt install fish -y

 

 

 

 

 

Step 3: Launch Fish

 

 

 

 

 

You can start fishing by entering,

 

 

# fish

 

 

If you want to leave Fish,

 

 

 

# exit

 

 

 

 

 

Step 4: Set up Fish

 

 

 

 

As a starting point, use the default configuration file,

 

 

cp /usr/share/fish/config.fish ~/.config/fish

 

 

 

Changes can be made by opening the configuration file using a text editor,

 

 

nano ~/.config/fish/config.fish

 

 

 

 

 

 

Step 5: Configure fish variables

 

 

 

 

 

Using the set command in Fish, you can set variables. As an example, you can assign the variable Foo the value BAR,

 

 

set Foo BAR

 

 

 

Unset Foo as follows,

set -e Foo

 

 

 

Display all variables with the following command,

 

 

# env

 

 

 

 

 

 

Step 6: Set Fish as your default shell.

 

 

 

 

 

You can set Fish as your default shell using chsh.

 

 

chsh -s /usr/bin/fish

 

 

 

For this to take effect, log out and then back in again.

 

You can restore Bash’s default shell by using chsh, logging out, and then logging back in again.

 

 

chsh -s /usr/bin/bash

 






That’s it, Thanks for reading! I hope it was informative for you! 

 

 

 

 


 

 

Try VPSie for free today!