Fundamentals 7 min read

Why Fish Shell Beats Bash: Features, Installation & Powerline Setup

This guide introduces the Fish (Friendly Interactive Shell) as a user‑friendly Bash alternative, outlines its smart features like command suggestions and syntax highlighting, provides step‑by‑step installation on Fedora (dnf and rpm‑ostree), shows configuration, alias and environment variable examples, and explains how to enhance it with Oh My Fish and Powerline.

21CTO
21CTO
21CTO
Why Fish Shell Beats Bash: Features, Installation & Powerline Setup

Overview

Fish (Friendly Interactive Shell) is a modern, user‑friendly command‑line shell for Linux, macOS and other Unix‑like systems. It provides a clean syntax, automatic suggestions, syntax highlighting and powerful tab‑completion based on manual pages.

Key User‑Friendly Features

History‑based command suggestions accelerate repetitive tasks.

Readable syntax avoids obscure characters used in traditional shells.

Argument completion is generated from the command’s man page.

Real‑time syntax highlighting improves readability.

Installation on Fedora Workstation

Install the shell and the util-linux-user package, then change the default login shell:

sudo dnf install fish
sudo dnf install util-linux-user
chsh -s /usr/bin/fish

Log out and log back in for the change to take effect.

Installation on Fedora Silverblue

Use the layered package manager rpm‑ostree to add Fish to the immutable image: rpm-ostree install fish Reboot to apply the new ostree image. To set Fish as the default shell, edit /etc/passwd as root and replace the shell path for your user (e.g., change /bin/bash to /usr/bin/fish), then log out and back in.

Configuration Files

User‑specific configuration is stored in ~/.config/fish/config.fish. System‑wide defaults can be placed in /etc/fish/config.fish. The installer does not create the user file automatically; create it manually if you need custom settings.

Aliases

In Bash: alias ll='ls -lh' (add to ~/.bashrc)

In Fish: alias ll='ls -lh' (add to ~/.config/fish/config.fish)

Environment Variables

Bash: export PATH=$PATH:~/bin Fish:

set -gx PATH $PATH ~/bin

Interactive Shortcuts

CTRL+F – incremental history search.

Type a dash ( -) and press TAB to show argument suggestions from the command’s manual page.

Press TAB repeatedly to cycle through completions; after a few presses the interface switches to an interactive mode where arrow keys can select a suggestion.

Enhancing Fish with Oh My Fish and Powerline

Oh My Fish (OMF) is a plugin manager that simplifies installing themes and extensions. curl -L https://get.oh-my.fish | fish Install the Powerline fonts required by many themes:

sudo dnf install powerline-fonts   # Fedora Workstation
rpm-ostree install powerline-fonts   # Fedora Silverblue (requires reboot)

Install the popular bobthefish theme via OMF:

omf install bobthefish

Recent Release

Fish 4.3 introduces smarter theme handling, improved auto‑completion, tighter terminal integration, numerous script and interactive feature enhancements, and overall stability improvements.

Fish GitHub: https://github.com/fish-shell/fish-shell
ConfigurationLinuxfish-shellshellpowerlinebash-alternativeoh-my-fish
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.