Greetings and salutations. In our guide today we will explore yet another Shell called Fish shell short form for the friendly interactive shell. Fish shell is a smart and user-friendly command line for Unix, Linux, and macOS. A shell is a program that helps you to operate your computer by starting other programs. From your shell, you can remotely access other computers and manage them from your local machine. Fish shell focuses more on usability and interactivity.
Some key features that come with Fish shell are Command Autosuggestions, Glorious VGA Color ( fish supports 24-bit true color ), Sane Scripting ( fish is fully scriptable, and its syntax is simple, clean, and consistent ), Web Based Configuration ( you can view your functions, variables and shell history from a web page ), Automatically generates Man Page Completions, and Works Out of the Box ( by tab completion and syntax highlighting).
Fish Shell was developed by Fish-shell developers in 2005 with Axel Liljencrantz being the original author of Fish Shell. It’s written in C++ programming language with the latest release being 3.7.x. Developers have a soft spot for Fish Shell because it is more customizable than Zsh and Bash.
Oh My Fish provides the infrastructure to install packages that help to modify your shell. With Oh My Fish you can change shell look, install, remove, list, and update packages. Oh My Fish works hand in hand with Fish Shell which means that Fish Shell must be installed first to use Oh My Fish. Oh fast, extensible, and easy to use.
In this guide, we will install Fish Shell and Oh My Fish on the Fedora system.
Begin by updating the system packages using the DNF package manager.
sudo dnf update
The command will update and refresh your package’s repository.
Step 1: Add fish shell repository
By default, the Fish shell repository is not available on the Fedora repository. Add the repository from the official openSUSE Build Service.
## Fedora 41
dnf config-manager addrepo --from-repofile=https://download.opensuse.org/repositories/shells:fish/Fedora_41/shells:fish.repo
## Fedora 40
dnf config-manager --add-repo https://download.opensuse.org/repositories/shells:fish/Fedora_40/shells:fish.repo
## Fedora 39
dnf config-manager --add-repo https://download.opensuse.org/repositories/shells:fish/Fedora_39/shells:fish.repo
## Fedora 38
dnf config-manager --add-repo https://download.opensuse.org/repositories/shells:fish/Fedora_38/shells:fish.repo
Once you have added the repository, update your system to enable the repository.
sudo dnf update -y
Confirm the repolist.
$ dnf repolist
repo id repo name
fedora Fedora 41 - x86_64
fedora-cisco-openh264 Fedora 41 openh264 (From Cisco) - x86_64
fedora-modular Fedora Modular 41 - x86_64
shells_fish The friendly interactive shell (Fedora_41)
updates Fedora 41 - x86_64 - Updates
updates-modular Fedora Modular 41 - x86_64 - Updates
Step 2: Install fish shell
We have added the repository in the above step. Let’s now install the Fish shell on our Fedora system.
Run the command:
$ sudo dnf install fish
[sudo] password for cloudspinx:
Last metadata expiration check: 0:12:52 ago on Sat 20 Aug 2022 01:59:24 PM EAT.
....
Transaction Summary
==============================================================================
Install 2 Packages
Total download size: 3.4 M
Installed size: 16 M
Is this ok [y/N]: y
------------------------------------------------------------------------------
Total 3.6 MB/s | 3.4 MB 00:00
The friendly interactive shell (Fedora_34) 11 kB/s | 1.1 kB 00:00
Importing GPG key 0xD880C8E4:
Userid : "shells:fish OBS Project <shells:[email protected]>"
Fingerprint: 24A63B31CAB41B33EC48801E2CE2AC08D880C8E4
From : https://download.opensuse.org/repositories/shells:/fish/Fedora_41/repodata/repomd.xml.key
Is this ok [y/N]: y
Agree with the prompt to import the GPG key. This will successfully install Fish Shell in your system.
Confirm the version of Fish Shell installed:
$ fish --version
fish, version 3.7.1
We have installed the latest version of Fish Shell.
If you wish to install the package via a binary package, navigate to the official page and grab your binary package.
Step 3: Configure the Fish shell on Fedora
Once Fish Shell is successfully installed, open your system’s terminal and type the below command to start using the fish shell.
$ fish
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
cloudspinx@fedora ~>
To exit from the fish shell, simply type exit and enter.
~> exit
Set Fish as the default shell for the user
To set Fish Shell as the default shell for the system user, execute the command below.
$ echo /bin/fish | sudo tee -a /etc/shells
/bin/fish
Then change your default shell to fish with the following command.
$ chsh -s /bin/fish
Changing shell for cloudspinx.
Password: <user password>
Shell changed.
To change the default shell to fish for another system user:
sudo chsh -s /bin/fish <username>
Exit from the shell by exit then issue the echo $SHELL
command.
~> exit
~> echo $SHELL
/bin/fish
The fish shell configuration can now be located in:
~/.config/fish
Step 4: Installing Oh My Fish on Linux
With Fish Shell now fully installed, we will install Oh My Fish on Fedora. Ensure your system has the following installed.
- Fish shell, version 2.2 or later
- Git, version 1.9.5 or later
Begin by installing git because the installation of Oh My Fish will be cloned from Github.
1: Install Git on Fedora.
$ sudo dnf install git
Last metadata expiration check: 0:55:55 ago on Sat 20 Aug 2022 01:59:24 PM EAT.
Dependencies resolved.
==============================================================================
Package Arch Version Repository Size
==============================================================================
....
Transaction Summary
==============================================================================
Install 8 Packages
Total download size: 6.7 M
Installed size: 34 M
Is this ok [y/N]: y
Confirm the version installed to see if it meets the requirements stated above.
$ git --version
git version 2.47.1
Our version is okay.
2: Install Oh My Fish.
$ curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 100 178 0 0 2508 0 --:--:-- --:--:-- --:--:-- 2542
100 19035 100 19035 0 0 85719 0 --:--:-- --:--:-- --:--:-- 85719
Checking for a sane environment...
Installing Oh My Fish to /home/cloudspinx/.local/share/omf...
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Writing bootstrap to /home/cloudspinx/.config/fish/conf.d/omf.fish...
Setting up Oh My Fish configuration...
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package default
✔ default successfully installed.
Installation successful!
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
⋊> cloudspinx@fedora ⋊> ~
Alternatively, you can also install Oh My Fish with Git or with an offline source tarball downloaded from the releases page:
# with git
git clone https://github.com/oh-my-fish/oh-my-fish
cd oh-my-fish
bin/install --offline
# with a tarball
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
fish install --offline=omf.tar.gz
Still, you can download the installer script and customize the installation.
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
fish install --path=~/.local/share/omf --config=~/.config/omf
Choose your preferred method. This will give the same output.
The configuration files for both Fish Shell and Oh My Fish are located in the ~/.config/
Step 5: Using the OMF management tool.
The OMF utility tool is used for installing, listing, updating, and removing packages and themes in Fish Shell. I will you some use cases of the OMF management tool.
Use the OMF tool to List installed packages
To list the installed packages, issue the command:
$ omf list
Plugins
fish-spec omf
Themes
default
Use OMF to Update all packages and repositories
Run the command:
$ omf update
Oh My Fish is up to date.
You are now using Oh My Fish version 7.
Updating https://github.com/oh-my-fish/packages-main master... Done!
default is already up-to-date.
Use OMF to List available themes
Run the command:
$ omf theme
Installed:
default
Available:
agnoster gianu plain
aight gitstatus pure
anchor gnuykeaj pygmalion
ays godfather random
batman graystatus randomrussel
beloglazov harleen red-snapper
bira heartsteal rider
bobthefish idan robbyrussell
boxfish integral sashimi
budspencer jacaetevha scorphish
cbjohnson johanson separation
chain kawasaki simple
clearance kovial simple-ass-prompt
cmorrell krisleech simplevi
coffeeandcode l slacker
cor lambda slavic-cat
cyan lambda-zero solarfish
dangerous lavender sushi
default lolfish syl20bnr
dmorrell mars taktoa
doughsay mint technopagan
eclm mish toaster
edan mokou tomita
eden mtahmed trout
emoji-powerline nai tweetjay
es neel uggedal
fishbone nelsonjchen will
fishface neolambda wolf-theme
fishy-drupal numist yimmy
fisk ocean zeit
flash one zephyr
fluffy pastfish zish
fox perryh
gentoo pie
4: Use OMF to Install a theme
For demonstration purposes, I will install a theme called cyan.
$ omf install cyan
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package cyan
✔ cyan successfully installed.
Apply the installed theme.
✗ omf theme cyan
Use OMF to install plugins
To install either plugin, run the command:
$ omf install weather
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package weather
Installing package config
✔ config successfully installed.
Installing package spark
Submodule 'spark' (https://github.com/holman/spark) registered for path 'spark'
Cloning into '/home/jil/.local/share/omf/pkg/spark/spark'...
Submodule path 'spark': checked out 'ab88ac6f8f33698f39ece2f109b1117ef39a68eb'
✔ spark successfully installed.
✔ weather successfully installed.
fish: config: command not found...
~/.local/share/omf/pkg/weather/conf.d/weather.fish (line 9):
config weather -q temperature-units
Use OMF to remove a package or theme
To remove a package or theme:
omf remove <package name>
omf remove <theme name>
Use OMF To uninstall Oh My Fish.
Run the command:
omf destroy
Step 6: Uninstall Fish Shell
To uninstall Fish Shell from your fedora system, Ensure that fish is not set as your default shell.
chsh -s /bin/bash
Then run the uninstall command
sudo dnf remove fish
Conclusion
Our guide today has shown you how to Install Fish Shell and Oh My Fish on Fedora. As you interact with Fish Shell, you will appreciate the fact that Fish Shell is indeed a friendly interactive shell. Enjoy its cool features.
More Shells guides: