10

For those who don't know what's Fish shell here's the home page

I would like to install it and make it default. But under their homepage when I click on download I'm redirected to the ppa page.

How can I install it?

3 Answers 3

12

It's pretty easy, first add the fish shell repository:

sudo apt-add-repository ppa:fish-shell/release-3

Then just updated your repos:

sudo apt-get update

Now we can install it:

sudo apt-get install fish

One more command and we are done:

chsh -s /usr/bin/fish

This last command will switch your default shell to fish. To see the changes close your terminal and open it again. If you didn't notice any changes try logging out and logging in.

Bonus tip: Fisher

Fisher is a concurrent plugin manager for the fish shell, it supports Oh My Fish plugins, it's fast, and powerful.

To install it run:

curl -sL git.io/fisher | source && fisher install jorgebucaran/fisher

Bonus tip: Oh My Fish

If you know zsh you probably know Oh My Zsh, well fish has a similar port, named Oh My Fish

To install it run:

curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install | fish

A side note, when you do this your fish shell configs are overwritten, quoting the README file:

NOTE: The installation script renames your existing config.fish to config.orig, and replaces it with the default oh-my-fish config. If you have existing customizations to your fish config, you will need to manually include those customizations after the install.

If you want to install it manually, click here.

Note: If by any reason you need to get back to your old bash friend, just type bash on your terminal, this will switch temporarily to bash, if you type exit or close the tab/terminal it will switch back to fish.

1
  • sudo: apt-add-repository: command not found
    – citykid
    Commented Jan 23, 2019 at 9:00
1

pantheon-terminal supports its process completion notifications for fish! To enable them, you need to put the following line either in /etc/fish/config.fish to enable them for the entire system or in ~/.config/fish/config.fish to enable them just for your user:

source /usr/share/pantheon-terminal/enable-fish-completion-notifications 2>/dev/null; or true

1

OS X

With Homebrew

brew install fish

Debian

wget http://download.opensuse.org/repositories/shells:fish:release:2/Debian_8.0/Release.key
apt-key add - < Release.key
echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/2/Debian_8.0/ /' >> /etc/apt/sources.list.d/fish.list
apt-get update
apt-get install fish

Ubuntu

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish

CentOS

cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/shells:fish:release:2/CentOS_7/shells:fish:release:2.repo
yum install fish

Fedora

cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/shells:fish:release:2/Fedora_23/shells:fish:release:2.repo
yum install fish

Arch Linux

pacman -S fish

Gentoo

emerge fish

From source

sudo apt-get -y install git gettext automake autoconf \
    ncurses-dev build-essential libncurses5-dev

git clone -q --depth 1 https://github.com/fish-shell/fish-shell
cd fish-shell
autoreconf && ./configure
make && sudo make install

How do I use fish as my default shell?

Add fish to the list of login shells in /etc/shells and make it your default shell.

echo "/usr/local/bin/fish" | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.