How to Install Fish Shell on Ubuntu (Latest Version 4)

Step-by-step guide to install the latest Fish Shell 4.x on Ubuntu from the official PPA, with initial configuration and tips for getting started.

How to Install Fish Shell on Ubuntu (Latest Version 4)

Ubuntu ships with Bash by default, and the Fish version in Ubuntu’s repositories is usually old. At the time of writing, the latest Fish is 4.5.0 (released February 17, 2026) while Ubuntu’s repos may still carry a 3.x version. The official Fish PPA gives you the current release.

Here’s how to get Fish 4.x installed and running on Ubuntu. If you’re on a Mac, see my Fish Shell macOS setup guide instead.

Install Fish from the official PPA

The Fish team maintains a PPA that tracks the latest stable release. Three commands and you’re done:

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

Verify it installed correctly:

fish --version

You should see something like fish, version 4.5.0.

Ubuntu version support

The Fish PPA supports Ubuntu 22.04, 23.04, 23.10, 24.04, and newer. If you’re on an older Ubuntu release, you may need to build from source or use the standalone binary from the GitHub releases page.

Try Fish without switching your default shell

You don’t have to commit right away. Just type:

fish

This drops you into a Fish session. You get autosuggestions, syntax highlighting, and tab completions immediately. Play around. Type a few commands. If you don’t like it, type exit and you’re back in Bash.

Set Fish as your default shell

Once you’re ready to commit:

which fish

This should return /usr/bin/fish. Now set it as your login shell:

chsh -s /usr/bin/fish

Log out and back in (or open a new terminal). Fish is now your default.

To switch back to Bash later:

chsh -s /usr/bin/bash

Keep Bash installed

Don’t remove Bash. Many system scripts depend on it, and you’ll want it around for running POSIX shell scripts. Fish replaces your interactive shell, not your system’s script interpreter.

Initial configuration

Fish’s config file lives at ~/.config/fish/config.fish. If it doesn’t exist, Fish creates it on first run. Here’s a basic starting config:

# ~/.config/fish/config.fish

# Add custom paths
fish_add_path ~/bin
fish_add_path ~/.local/bin

# Disable the greeting message
set -g fish_greeting

# Set your preferred editor
set -gx EDITOR vim

A few things to note:

  • fish_add_path is the Fish way to add directories to your $PATH. Don’t try to use export PATH=... like in Bash.
  • set -g sets a global variable for the current session. set -gx also exports it to child processes.
  • set -g fish_greeting with no value suppresses the default “Welcome to fish” message.

Modular configuration with conf.d

Fish sources every .fish file in ~/.config/fish/conf.d/ at startup. This is cleaner than dumping everything into one file. For example, you could create:

# ~/.config/fish/conf.d/aliases.fish
abbr -a gst git status
abbr -a gco git checkout
abbr -a gp git push

I cover abbreviations vs aliases in detail in Fish Shell abbreviations vs aliases. Short version: Fish abbreviations expand into the full command before executing, which is better than aliases in most cases.

Install a plugin manager

Fish works fine without plugins, but a plugin manager lets you add things like better git integration, fzf search, and Node version management.

Fisher is the most popular choice:

curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher

Now you can install plugins with fisher install. For example:

fisher install PatrickF1/fzf.fish
fisher install jorgebucaran/nvm.fish

I have a full guide on the best Fish Shell plugins and tools if you want recommendations.

Set up your prompt

Fish comes with a decent default prompt, but you have several options for customizing it:

Option 1: Built-in themes. Run fish_config and a browser window opens where you can pick from several built-in prompt styles and color schemes.

Option 2: Tide. This is a popular Fish-native prompt with a configuration wizard. Install it via Fisher:

fisher install IlanCosman/tide@v6

Then run tide configure to walk through the setup.

Option 3: Starship. A cross-shell prompt written in Rust that works with Fish, Zsh, Bash, and others. I have a dedicated guide on setting up Starship with Fish Shell. If you’ve used Starship with Zsh before (like in my Starship and Ghostty setup guide), the Fish setup is almost identical. For a full comparison of all Fish prompt options, see my Fish Shell themes and prompts guide.

Useful things to know right away

Command history search. Press Ctrl+R to search your history. Fish uses glob syntax by default, so git*commit matches any history entry containing “git” followed later by “commit”. I cover history management in depth in my Fish Shell history and persistence guide.

Autosuggestions. As you type, Fish shows grayed-out suggestions based on your history and available completions. Press the right arrow key to accept, or Alt+Right to accept one word at a time.

Tab completions. Fish generates completions from man pages automatically. Try typing git checkout and pressing tab. You’ll see branch names, flags, and more without installing anything extra.

Web configuration. Run fish_config to open a browser-based tool for changing your colors, prompt, and viewing defined functions. It’s genuinely useful for exploring what’s available.

Common issues

Fish doesn't appear in /etc/shells

If chsh complains, you may need to add Fish to the allowed shells manually:

echo /usr/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/bin/fish
Bash scripts don't work in Fish

That’s expected. Fish has its own syntax. Run Bash scripts with bash script.sh or add #!/bin/bash at the top and make them executable. Your existing scripts don’t need to change, just run them explicitly with Bash.

Environment variables from .bashrc are missing

Fish doesn’t read .bashrc or .bash_profile. You need to set your environment variables in ~/.config/fish/config.fish using set -gx:

set -gx JAVA_HOME /usr/lib/jvm/java-21
set -gx GOPATH ~/go
fish_add_path $GOPATH/bin

Where to go from here