Back to terminal directory

Shells · Shells

fish

Friendly interactive shell with autosuggestions out of the box.

Open sourceRust
Official site
Short answer

fish, the friendly interactive shell, is a free, open-source command-line shell for macOS, Linux and WSL. It works well with no configuration: it suggests commands from your history as you type, colors commands red or blue to show whether they exist, and completes options for thousands of tools from their man pages. fish 4.0, released on February 27, 2025, ported the core from C++ to Rust. The current release is 4.9.3, from September 8, 2026. fish is not POSIX compatible, so bash scripts still run in bash. Install it with brew install fish or your Linux package manager.

License
GPL v2
GitHub, fish-shell/fish-shell
Core language
Rust, since fish 4.0 (February 27, 2025)
fish release notes
Current release
4.9.3, September 8, 2026
fish release notes
Config file
~/.config/fish/config.fish
fish docs

Updated October 21, 2026How we evaluate tools

fish shell guide: install, autosuggestions, config and the Rust rewrite

fish has been around since 2005 and has always aimed at one thing: a shell that is pleasant to use interactively without spending an evening on configuration. Its main features, autosuggestions, syntax highlighting and good completions, work the moment you start it.

The biggest change in its history came in fish 4.0, released on February 27, 2025. The team ported the core from C++ to Rust over about two years. The project told users to expect no direct impact, and the visible changes were small, but the port gave fish a codebase that its maintainers say is easier to work on and safer. Releases have come regularly since. fish 4.9.0 shipped on September 3, 2026, followed by three patch releases fixing keyboard layout and macOS input issues, with 4.9.3 on September 8, 2026.

Installing fish

SystemCommand
macOSbrew install fish
Debian, Ubuntusudo apt install fish
Fedorasudo dnf install fish
Archsudo pacman -S fish
Any LinuxStandalone binaries from the fish GitHub releases page
WindowsUse inside WSL

Distribution packages can be old. The fish project runs its own repositories for Ubuntu (a PPA) and openSUSE Build Service packages for other distributions.

Trying it first. Type fish in your current shell. Type exit to go back. Nothing changes until you set it as your default.

Making it the default:

command -v fish | sudo tee -a /etc/shells
chsh -s "$(command -v fish)"

Log out and back in. Some people keep bash or zsh as the login shell and set their terminal app to start fish instead, which avoids problems with tools that expect a POSIX login shell.

What you get with no configuration

Autosuggestions. As you type, fish shows the rest of a matching command from your history in gray. Press the right arrow or Ctrl-F to accept it, or Alt-right arrow to accept one word.

Syntax highlighting. Commands turn red if they do not exist and blue or green if they do. Paths are underlined when they exist. You catch typos before pressing Enter.

Completions. Tab completes commands, paths and options, with descriptions. fish generates completions for many tools by parsing their man pages, and ships hand-written completions for git, docker, npm, ssh and hundreds more.

History search. Type part of a command and press the up arrow to step through history entries containing it. Ctrl-R opens a searchable history pager.

Web configuration. fish_config opens a browser page for choosing colors and prompts and viewing functions and variables.

Configuration

fish reads ~/.config/fish/config.fish at startup. Files in ~/.config/fish/conf.d/ also load, which suits tool setup lines:

# ~/.config/fish/config.fish
set -gx EDITOR nvim
fish_add_path ~/.local/bin

if status is-interactive
    starship init fish | source
    fzf --fish | source
    zoxide init fish | source
end

set -gx creates an exported global variable, the fish equivalent of export. fish_add_path adds a folder to PATH once, without duplicates.

Functions live one per file in ~/.config/fish/functions/ and load the first time you use them:

# ~/.config/fish/functions/mkcd.fish
function mkcd
    mkdir -p $argv[1]; and cd $argv[1]
end

You can also write a function at the prompt and save it with funcsave mkcd.

Abbreviations expand as you type, so the full command lands in history:

abbr -a gs git status
abbr -a gco git checkout

Since 4.9, abbreviations can carry a description that appears in the completion pager.

Notes for people upgrading through 4.x

The 4.x series changed a few things that existing users notice:

  • Themes. When upgrading from a release older than 4.3, fish may create ~/.config/fish/conf.d/fish_frozen_theme.fish to keep your old colors. fish 4.8 made this smarter: if your theme matches a historical default, it skips the file. Delete the file if you want the new default colors.
  • Keyboard handling. fish 4 uses newer terminal keyboard protocols where available, so more key combinations can be bound separately, such as Shift-Space and Space on terminals like kitty. Bindings now use readable names such as ctrl-r and alt-left. Some terminals had bugs with these protocols, and fish added workarounds, including turning the kitty keyboard protocol off for one version of Konsole in 4.9.
  • Stricter scripting in places. Since 4.9, a command such as status=123 echo $status raises an error instead of silently ignoring the override.
  • cd options. fish 4.8 added cd -L and cd -P, matching other shells' handling of symbolic links.

If a binding or color looks wrong after an upgrade, check the release notes for your version before filing a bug.

Universal variables

fish has a third kind of variable beyond local and global: universal variables, set with set -U, which persist across restarts and are shared by every running fish session at once. Change a universal variable in one terminal and the others see it immediately. fish uses them for its own settings, such as colors set through fish_config. Use them sparingly for your own settings, since values in config.fish are easier to track in a dotfiles repository.

fish scripting basics

fish's language is simpler than POSIX shell. A few differences matter most:

Taskbashfish
Set a variableNAME=valueset NAME value
Exportexport NAME=valueset -gx NAME value
Command output$(cmd)(cmd) or $(cmd)
Ifif [ -f x ]; then ...; fiif test -f x; ...; end
Loopfor f in *.txt; do ...; donefor f in *.txt; ...; end
Arguments$1, $@$argv[1], $argv

Variables in fish are lists, and they do not split on spaces, which removes a whole class of quoting bugs.

Using fish with AI agents

Most AI coding agents run commands through bash or sh, not your interactive shell, so fish does not affect what agents execute. It helps on your side of the work: autosuggestions recall long commands an agent ran, abbreviations shorten the git commands you use to review agent changes, and syntax highlighting catches mistakes when you edit a command an agent suggested. If an agent writes setup instructions in bash syntax, run them in bash rather than pasting them into fish.

Limits

Not POSIX. Copying bash snippets from documentation often needs translation. Scripts meant for others should target bash or sh.

Some tools assume bash or zsh. Tool installers that edit ~/.bashrc will not configure fish. Most popular tools publish fish instructions. For others, bass or fenv plugins can run bash setup scripts and import the result.

Login shell edge cases. A few system tools and remote environments expect a POSIX login shell. Starting fish from your terminal app instead avoids this.

fish compared with other shells

ShellPOSIX compatibleAutosuggestions and highlightingConfig effort
fishNoBuilt inLow
zshMostlyWith pluginsMedium, often a framework
bashYesLimited, with add-onsMedium
NushellNoBuilt inMedium, structured data model

Choose fish if you want a friendly shell that works well with no setup and you are happy to keep scripts in bash. Add Starship for a cross-shell prompt and fzf for fuzzy pickers. See the terminal tools guide for more.

Frequently asked questions

What makes fish different from bash and zsh?

fish ships with features that bash and zsh need plugins for: autosuggestions from history, syntax highlighting as you type, rich tab completions, a web-based configuration page and sensible defaults. It also uses its own scripting language, which is cleaner than POSIX shell syntax but not compatible with it. You get a friendly interactive shell in exchange for writing scripts that run only in fish, or keeping scripts in bash.

How do I install fish and make it my default shell?

Install with brew install fish on macOS, sudo apt install fish on Debian and Ubuntu, sudo dnf install fish on Fedora or sudo pacman -S fish on Arch. Standalone Linux binaries are also published. To make it the default, add its path to /etc/shells if it is not there, for example with command -v fish | sudo tee -a /etc/shells, then run chsh -s followed by that path. Log out and back in.

Can fish run my bash scripts?

Scripts with a #!/bin/bash or #!/usr/bin/env bash first line keep running in bash, whatever your interactive shell is. What does not work is pasting bash-specific syntax into a fish prompt or sourcing bash files from config.fish. fish 3.0 and later accept && and ||, and fish handles many common one-liners, but loops, variable assignment and functions use fish syntax.

What changed in fish 4?

fish 4.0 moved the core code from C++ to Rust. The project said users should see no direct difference, and the change mainly affects people who build or package fish. It dropped the ncurses dependency, rewrote the web configuration with Alpine.js, and later 4.x releases added features such as improved keyboard protocol support, abbreviation descriptions and better vi mode, along with many fixes.

Does fish work with Starship, fzf and other tools?

Yes. Starship supports fish with starship init fish | source. fzf has built-in fish integration with fzf --fish | source. zoxide, direnv, mise and most other popular tools publish fish setup lines. Plugin managers such as Fisher install fish plugins, though fish needs fewer plugins than zsh because so much is built in.

Sources

  1. fish shell website
  2. fish release notes
  3. fish documentation, tutorial
  4. fish on GitHub
  5. Fisher plugin manager