DebianDebian Based

How To Install Fish Shell on Debian 13

Install Fish Shell on Debian 13

The command line interface remains the backbone of Linux system administration and development workflows. While Bash has dominated the shell landscape for decades, a new generation of shells offers enhanced user experiences that significantly boost productivity. Fish Shell, or the Friendly Interactive SHell, represents a paradigm shift in how users interact with their terminal environments. This comprehensive guide walks you through installing Fish Shell on Debian 13 (Trixie), configuring it properly, and unlocking its powerful features.

Whether you’re a system administrator managing multiple servers or a developer seeking a more intuitive command-line experience, Fish Shell delivers modern functionality without compromising reliability. Released with version 4.2.0 in November 2025, Fish continues to evolve with features that make terminal work faster and more enjoyable.

What is Fish Shell?

Fish Shell stands for Friendly Interactive SHell, a command-line interpreter designed specifically for interactive use rather than scripting. Unlike traditional shells that prioritize backward compatibility and POSIX compliance, Fish focuses on user-friendliness, discoverability, and intelligent defaults. The development philosophy centers on creating a shell that works beautifully straight out of the box, eliminating the extensive configuration typical with other shells.

First released in 2005, Fish has evolved into a mature shell environment trusted by developers worldwide. The project maintains active development with regular updates that introduce performance improvements and new features. The latest version, Fish 4.2.0 released November 2025, includes enhanced multi-line command history and improved terminal integration.

What distinguishes Fish from competitors like Bash and Zsh is its commitment to sensible defaults. New users can immediately benefit from features that require extensive plugin configuration in other shells. This makes Fish particularly attractive for those transitioning from graphical interfaces to command-line work.

Standout Features That Boost Productivity

Fish Shell includes autosuggestions that intelligently predict commands based on your command history and installed programs. As you type, Fish displays gray text showing potential completions. Simply press the right arrow key to accept suggestions. This feature alone can reduce typing by 50% or more for repetitive tasks.

Syntax highlighting provides real-time visual feedback about command validity. Valid commands appear in one color, invalid commands in another, and file paths highlight differently when they exist versus when they don’t. This immediate feedback prevents errors before you press enter.

The web-based configuration interface sets Fish apart from all competitors. Running a single command launches a browser-based control panel where you can customize colors, view functions, set variables, and manage key bindings without editing configuration files. This graphical approach makes customization accessible to users uncomfortable with manual file editing.

Tab completion in Fish goes beyond basic filename completion. Fish understands command-specific arguments and options, providing contextual completions that adapt to what you’re typing. Git commands, for example, show relevant branches and files, while system commands display appropriate flags with descriptions.

The clean scripting syntax eliminates many of the quirks that make shell scripting challenging. While this means Fish scripts aren’t POSIX-compliant and won’t run in Bash, the improved readability makes maintaining Fish-specific scripts significantly easier.

Built-in help documentation provides comprehensive reference material accessible directly from the terminal. The help command opens detailed documentation in your browser, making learning Fish intuitive and self-contained.

Prerequisites and System Requirements

Before beginning the installation process, ensure your system meets the necessary requirements. You need a Debian 13 (Trixie) installation—released August 2025—running on your computer or server. Debian 13 includes over 69,000 packages and provides five years of security support, making it an excellent foundation for Fish Shell.

Your user account must have sudo privileges or root access to install system packages. If you can run commands with sudo, you’re ready to proceed. Server administrators typically work with accounts that have these permissions by default.

An active internet connection is essential for downloading Fish Shell and its dependencies from Debian repositories. The installation process retrieves packages from remote servers, so stable connectivity ensures smooth installation.

Terminal knowledge helps, though Fish’s user-friendly design accommodates beginners. You should feel comfortable opening a terminal, typing commands, and navigating directories. Fish itself will handle most complexity, but basic familiarity with Linux commands makes the learning curve gentler.

For advanced customization covered later, having Git and curl installed proves useful. These tools enable installing theme frameworks and additional plugins that extend Fish functionality.

Pre-Installation Preparation Steps

Proper system preparation prevents common installation issues. Start by updating your package lists to ensure you’re installing the latest available software versions. Open your terminal and execute these commands:

sudo apt update

This command refreshes the local package index by querying Debian repositories for current package information. You’ll see output indicating which repositories are being contacted and updated. Following the update, upgrade existing packages:

sudo apt upgrade

The upgrade process installs newer versions of currently installed software, resolving security vulnerabilities and bugs. Keeping your system updated ensures compatibility with new software like Fish Shell.

Next, verify your current shell configuration. Run:

echo $SHELL

This displays the path to your default shell, typically /bin/bash. Knowing your current shell helps you understand what changes when switching to Fish. If you have custom configurations in .bashrc or .bash_profile, you may want to back them up before proceeding.

Consider creating a backup of existing shell configuration files:

cp ~/.bashrc ~/.bashrc.backup
cp ~/.bash_profile ~/.bash_profile.backup 2>/dev/null

These backups provide a safety net if you need to revert changes. The second command includes 2>/dev/null to suppress errors if the bash_profile doesn’t exist, which is common on Debian systems.

Installation Methods for Fish Shell

Installing from Official Debian Repository

The simplest installation method uses Debian’s official package repositories. Debian 13 Trixie includes Fish Shell in its standard repositories, providing a tested and stable version that integrates seamlessly with your system.

Execute the installation command:

sudo apt install fish

The system displays information about Fish Shell and any dependencies it requires. Type Y and press Enter to confirm installation. The apt package manager downloads Fish Shell binaries, documentation, and supporting files, installing them in appropriate system directories.

Installation typically completes within 30-60 seconds depending on connection speed. You’ll see progress indicators as packages download and install. Once finished, verify the installation succeeded:

fish --version

This command should output something like fish, version 4.0.2 or higher, depending on what version Debian 13 includes. The version number confirms Fish installed correctly and is accessible from your command line.

Check where Fish installed:

which fish

This typically returns /usr/bin/fish, showing the binary location. Knowing this path is important for setting Fish as your default shell later.

Advantages of this method include simplicity, stability, and automatic updates through Debian’s package management system. When Debian releases security updates for Fish Shell, your system receives them automatically during regular updates. This method integrates perfectly with Debian’s dependency tracking and ensures compatibility with other system packages.

Potential limitation: The Debian repository version may lag behind the absolute latest Fish Shell release. Debian prioritizes stability over cutting-edge features, so repository packages undergo extensive testing before inclusion. For most users, this conservative approach provides excellent reliability.

Installing from OpenSUSE Build Service

Users wanting the latest Fish Shell features can install from the OpenSUSE Build Service (OBS) repositories. This community-maintained repository provides current Fish versions compiled specifically for Debian systems.

First, source your OS release information to ensure compatibility:

source /etc/os-release

This command loads Debian version details into environment variables. Next, add the Fish Shell repository:

echo "deb http://download.opensuse.org/repositories/shells:/fish/Debian_$VERSION_ID/ /" | sudo tee /etc/apt/sources.list.d/fish.list

This creates a new repository configuration file in /etc/apt/sources.list.d/ that points to the OBS Fish repository for your Debian version.

Import the repository’s GPG signing key to verify package authenticity:

curl -fsSL https://download.opensuse.org/repositories/shells:fish/Debian_$VERSION_ID/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_fish.gpg > /dev/null

This command downloads the repository’s public key and installs it in Debian’s trusted keyring. Package managers use these keys to verify that downloaded packages haven’t been tampered with.

Update your package lists to include the new repository:

sudo apt update

Finally, install Fish Shell:

sudo apt install fish

The system now pulls Fish from the OBS repository rather than Debian’s standard repository. Verify installation with fish --version as before.

Benefits of OBS installation include access to newer features and faster bug fixes. The Fish development team releases updates more frequently than Debian incorporates them into stable repositories. If you need specific features from recent releases, this method delivers them.

Considerations: Third-party repositories require additional maintenance awareness. While OBS repositories are generally reliable, they don’t undergo the same rigorous testing as official Debian packages. Monitor the repository for updates and verify that packages continue working correctly after system upgrades.

Testing Fish Without Installing

Before committing to full installation, you can test Fish interactively. If you have access to a system where Fish is already installed, or you’re considering it on a server, simply type:

fish

This launches a Fish session within your current shell. You’ll see Fish’s welcome message and immediately experience its features. Try typing commands to see syntax highlighting and autosuggestions in action. Press Tab to explore Fish’s intelligent completion system.

To exit the test session, type:

exit

This returns you to your previous shell. Test sessions help you evaluate whether Fish suits your workflow before making it your default shell. This approach proves especially valuable on production servers where shell changes require careful consideration.

Verifying Installation Success

After installation, perform comprehensive verification to ensure Fish works correctly. Run multiple checks:

fish --version
which fish
fish -c "echo Fish Shell is working correctly"

The first command displays the version number. The second shows the binary path. The third executes a simple Fish command, demonstrating that Fish can run scripts and commands properly.

You can also start an interactive Fish session:

fish

Look for Fish’s welcome message and command prompt. Try a few commands to confirm functionality. Type help to open Fish’s comprehensive documentation, verifying that help system integration works.

Setting Fish Shell as Your Default

Installing Fish doesn’t automatically make it your default shell—you’ll continue using Bash or whatever shell you had previously. Changing default shells requires specific steps to ensure system compatibility.

Understanding Shell Changes

Your default shell determines what environment launches when you log in or open terminal windows. Different shells have distinct syntax, features, and configuration files. Switching from Bash to Fish means moving from a POSIX-compliant shell to one with modern conveniences but different scripting syntax.

Consider these factors before changing defaults: Will you need to run Bash scripts? Do you have existing shell configurations you want to preserve? Are you comfortable learning a new shell syntax? Fish’s non-POSIX nature means Bash scripts won’t run directly in Fish, though you can still execute them by calling bash explicitly.

Making Fish Your Default Shell

First, ensure Fish is listed in the system’s valid shells file. Add Fish to /etc/shells:

echo /usr/bin/fish | sudo tee -a /etc/shells

This command appends Fish’s path to the shells file if it’s not already present. The /etc/shells file lists all valid login shells on your system. Only shells listed here can be set as user default shells for security reasons.

Now change your default shell using the chsh command:

chsh -s /usr/bin/fish

The change shell command updates your user account configuration. If Fish installed in a different location (check with which fish), use that path instead. Some systems install Fish at /bin/fish rather than /usr/bin/fish.

The change won’t take effect until you log out and log back in. This is because your default shell is loaded during the login process. Simply closing and reopening terminal windows within an active session won’t switch shells—you must start a new login session.

After logging back in, verify the change:

echo $SHELL

This should now display /usr/bin/fish. You’re now running Fish as your default shell. Every new terminal session will automatically launch Fish.

Setting Fish as Default for Other Users

System administrators can set Fish as the default shell for other user accounts:

sudo chsh -s /usr/bin/fish username

Replace username with the actual account name. This proves useful when configuring multiple user accounts or setting up standardized environments across teams. Ensure users understand they’ll be working with Fish rather than Bash to avoid confusion.

Install Fish Shell on Debian 13

Alternative Approach: Conditional Loading

Some users prefer not changing their system default shell but still want Fish as their interactive shell. This hybrid approach maintains Bash as the login shell while automatically starting Fish for interactive sessions.

Add this to the end of your .bashrc file:

if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} ]]
then
    exec fish
fi

This conditional checks whether Fish is already running and whether Bash is executing a script. If neither condition is true, it launches Fish. This approach prevents issues with scripts that expect Bash while giving you Fish’s interactive benefits.

Terminal emulators also typically offer options to launch specific shells. Configure your terminal emulator to run /usr/bin/fish instead of the default shell for a similar effect without modifying system files.

Configuring Fish Shell

Fish stores configuration in ~/.config/fish/ directory, following XDG Base Directory standards. This differs from Bash’s home directory configuration files. The main configuration file is ~/.config/fish/config.fish, equivalent to Bash’s .bashrc.

Fish creates the configuration directory automatically on first launch. If it doesn’t exist, create it manually:

mkdir -p ~/.config/fish

Creating Your Configuration File

Create or edit config.fish with your preferred text editor:

nano ~/.config/fish/config.fish

This file executes every time Fish starts an interactive session. Unlike Bash which has multiple configuration files (.bash_profile, .bashrc, .profile), Fish uses a single unified configuration approach that’s simpler to manage.

Essential Configuration Options

Environment variables in Fish use distinct syntax from Bash. Instead of export, Fish uses the set command:

set -x EDITOR nano
set -x VISUAL nano

The -x flag exports variables to child processes, similar to Bash’s export keyword. Common variables to set include EDITOR, VISUAL, BROWSER, and any application-specific environment variables your workflow requires.

Creating aliases follows Fish-specific syntax:

alias ll='ls -lah'
alias gs='git status'
alias gp='git pull'

Fish aliases work similarly to Bash aliases but integrate better with Fish’s completion system.

Abbreviations provide a more powerful alternative to aliases:

abbr -a -g gco 'git checkout'
abbr -a -g gaa 'git add --all'

Unlike aliases which remain as-is in your command history, abbreviations expand when you press Space or Enter. Your history shows the full command rather than the abbreviation, making it easier to understand past commands. The -a flag adds the abbreviation, and -g makes it global (available everywhere).

Removing the welcome message creates a cleaner terminal experience:

set fish_greeting

This sets the greeting to an empty string, suppressing Fish’s welcome text. For a persistent setting across all sessions:

set --universal fish_greeting

Universal variables persist across all Fish sessions and survive shell restarts.

Managing PATH in Fish

PATH configuration in Fish differs from Bash. Add directories to PATH using:

set -gx PATH /usr/local/bin $PATH

This prepends /usr/local/bin to your PATH. The -g flag creates a global variable (available to all functions and scripts), while -x exports it. Common PATH additions include language-specific package managers:

set -gx PATH $HOME/.cargo/bin $PATH
set -gx PATH $HOME/.local/bin $PATH
set -gx PATH $HOME/go/bin $PATH

Fish automatically handles PATH deduplication, preventing the same directory from appearing multiple times.

Web Configuration Interface

Fish’s standout feature is its web-based configuration tool. Launch it with:

fish_config

This opens your default browser with Fish’s configuration interface. The web UI provides:

  • Color scheme previews and selection
  • Prompt theme browser with live previews
  • Environment variable viewer and editor
  • Function browser showing all defined functions
  • Abbreviation manager
  • Key binding customizer

Changes made through the web interface automatically update your configuration files. This graphical approach makes Fish customization accessible without memorizing configuration syntax or editing files manually.

Advanced Customization with Oh My Fish

Oh My Fish (OMF) serves as a package manager and theme framework for Fish Shell. Similar to Oh My Zsh, OMF provides centralized access to community-created themes and plugins that extend Fish functionality.

Installing Oh My Fish

First, ensure Git is installed:

sudo apt install git -y

Git enables downloading OMF and its packages from GitHub repositories. Install Oh My Fish with this command:

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

The installation script downloads OMF and configures it within your Fish environment. You’ll see output indicating the installation progress. Once complete, restart Fish or source your configuration:

source ~/.config/fish/config.fish

Verify OMF installed correctly:

omf version

This displays the installed Oh My Fish version, confirming successful installation.

Exploring and Installing Themes

OMF provides numerous themes that customize your prompt appearance. Browse available themes:

omf theme

This lists installed themes. View all available themes at the OMF GitHub repository or install specific themes:

omf install bobthefish
omf install ocean

Popular themes include bobthefish (a powerline-style theme), ocean (clean and minimal), and agnoster (information-dense). Themes automatically activate upon installation. Switch between installed themes:

omf theme ocean

Many themes require powerline fonts for proper symbol rendering. Install powerline fonts if you see strange characters in your prompt after theme installation.

Installing Plugins

OMF plugins add functionality beyond theming. Search available plugins:

omf search

Install useful plugins:

omf install z
omf install bang-bang

The z plugin enables quick directory navigation based on frecency (frequency + recency) data. The bang-bang plugin adds !! expansion for repeating the previous command, familiar to Bash users.

Alternative: Fisher Plugin Manager

Fisher offers a lightweight alternative to Oh My Fish:

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

Fisher provides fast plugin installation with minimal overhead. Install plugins:

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

Both OMF and Fisher work well—choose based on personal preference. OMF offers more themes and a larger plugin ecosystem, while Fisher prioritizes speed and simplicity.

Starship Prompt Customizer

Starship provides a cross-shell prompt customizer compatible with Fish:

curl -sS https://starship.rs/install.sh | sh

Add to your config.fish:

starship init fish | source

Starship offers extensive customization through a single configuration file (~/.config/starship.toml), displaying git status, language versions, execution time, and more.

Troubleshooting Common Issues

Prompt Display Errors on Debian 13

Users upgrading to Debian 13 Trixie with Fish 4.0.2+ may encounter strange characters in prompts when connecting via certain terminals. Terminals like Termux, Apache Guacamole SSH, and Proxmox NoVNC display garbled text such as ;special_key=1 or ;1m in the prompt.

This occurs because Fish 4.0+ enables terminal features that some terminals don’t properly support, specifically prompt marking and keyboard protocol enhancements.

Solution: Disable these features in Fish by adding to your config.fish:

set fish_features no-mark-prompt no-keyboard-protocols

This tells Fish to avoid using advanced terminal features, falling back to compatibility mode. The setting takes effect immediately in new Fish sessions. This workaround maintains usability while terminal applications update to support modern protocols.

PATH Issues After Installation

Commands that worked in Bash may fail in Fish with “command not found” errors. This happens because Fish doesn’t automatically source Bash’s PATH configuration from .bashrc or .bash_profile.

Solution: Manually configure PATH in config.fish as described earlier. Check your Bash PATH:

bash -c 'echo $PATH'

Then add missing directories to Fish’s PATH configuration. Remember that Fish uses different syntax—convert Bash’s export PATH="/new/path:$PATH" to Fish’s set -gx PATH /new/path $PATH.

Bash Script Compatibility

Fish is not POSIX-compliant, meaning Bash scripts won’t run directly in Fish. Attempting to execute Bash scripts in Fish produces syntax errors.

Solution: Execute Bash scripts explicitly using Bash:

bash script.sh

Alternatively, add #!/bin/bash shebang to scripts and make them executable. The shebang tells the system to use Bash regardless of your current shell. For serious scripting work, consider maintaining Bash as your scripting environment while using Fish for interactive sessions.

Package Dependency Conflicts

Rarely, installation fails due to dependency conflicts or package unavailability. Error messages indicate which packages conflict or are missing.

Solution: Update your system completely before installing Fish:

sudo apt update && sudo apt full-upgrade

If conflicts persist, check if other packages block Fish installation. Remove conflicting packages if they’re non-essential, or research alternative resolution methods specific to your conflict.

Getting Additional Help

Fish’s built-in help system provides comprehensive documentation:

help
help set
help function

The first command opens the general help browser. Subsequent commands show help for specific topics or commands. Official documentation at fishshell.com offers tutorials, FAQs, and detailed reference material.

The Fish community maintains active GitHub discussions and issue tracking at github.com/fish-shell/fish-shell. Search existing issues before creating new ones—your problem likely has documented solutions.

Best Practices for Fish Shell Users

Start conservatively with default Fish before heavily customizing. Fish works excellently out of the box, and excessive plugins can slow shell startup or create conflicts. Add customizations gradually based on actual needs rather than perceived requirements.

Maintain configuration backups by version-controlling your ~/.config/fish directory. Use Git to track changes:

cd ~/.config/fish
git init
git add .
git commit -m "Initial Fish configuration"

This enables rolling back problematic changes and synchronizing configurations across multiple machines.

Test before committing to Fish as your default shell. Run Fish for several days as a secondary shell, learning its syntax and features. This reduces friction when making the permanent switch and helps identify workflow adjustments needed.

Learn Fish-specific syntax rather than translating Bash commands directly. Fish’s syntax is often simpler and more consistent than Bash, but expecting Fish to behave exactly like Bash creates frustration. Embrace Fish’s differences to leverage its strengths.

Leverage built-in features before installing plugins. Fish includes robust functionality that other shells require plugins to achieve. Explore Fish’s native capabilities thoroughly—you may find plugins unnecessary.

Migrate configurations incrementally when transitioning from Bash. Convert essential aliases and functions first, adding convenience configurations over time. This prevents overwhelming yourself while ensuring critical tools remain accessible.

Exploit autosuggestions and completion by typing partial commands and pressing Tab frequently. These features save substantial time once you build the habit of using them. Right arrow accepts suggestions; Tab explores completions.

Check compatibility before installing themes or plugins, especially on Debian 13 with Fish 4.0+. Some older plugins may not work correctly with recent Fish versions. Review plugin documentation and recent issues to verify compatibility.

Keep Fish updated through regular system updates:

sudo apt update && sudo apt upgrade

Updates include bug fixes, performance improvements, and new features. Fish 4.1 and 4.2 brought significant enhancements including brace expansion, transient prompts, and improved terminal integration. Staying current ensures you benefit from ongoing development.

Congratulations! You have successfully installed Fish Shell. Thanks for using this tutorial to install the latest version of the Fish Shell on Debian 13 “Trixie” system. For additional help or useful information, we recommend you check the official Fish Shell website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button