Fish is a command interpreter; one of several translators between User and Operating System known as shell, such as: cmd, PowerShell, bash, zsh, etc..
One of the best things of Fish is that the AutoComplete and AutoSuggestion features are factory-installed, ready to use with no need to install or configure.
Click here to learn more about Fish Shell
Since Fish is a shell for Unix, that means, it doesn't work on standard Windows, so you will need to install Windows Subsystem for Linux (WSL)
Before proceeding with this tutorial, create a System Restore Point (C:/) - ALWAYS do that when installing or changing Windows settings.
To install the latest and best version of WSL (WSL 2), your machine needs to support Hyper-V. In some cases, Windows 11 may have it enabled by default. To check, open the Task Manager.
If it's disabled, restart your machine and access the BIOS to enable it. The Hyper-V/Virtualization setting is usually found under Advanced or CPU Configuration.
Note: If you don’t have Hyper-V, you can still install WSL version 1.
Open Command Prompt (cmd) as Administrator and run the command below.
Note: If
wsl --install
returns the HELP Menu, this means you already have wsl installed - go to the next step
wsl --install
Note: If Ctrl + v doesn't work in the terminal, press the right mouse button to paste.
wsl --install
will execute the following actions:
- Enables the WSL and Virtual Machine Platform components
- Downloads and install the latest Linux Kernel
- Downloads and installs the Ubuntu Linux distribution
After complete installation, Restart your Computer
Note: If the auto installation fails, install manually
Now that WSL has been installed, click on the Start Menu and open the "app" Ubuntu
Note: If the app doesn't appear, click here and search for Ubuntu, select the installed version and click Start
Wait for the installation to finish and register a username and password
Open cmd and run the command bash
or wsl
to access your Linux (Ubuntu) environment
sudo apt-add-repository ppa:fish-shell/release-3
Note: if
apt-add-repository
is a not found command runsudo apt install software-properties-common
sudo apt update && sudo apt upgrade
sudo apt install fish
That's it, congratulations, you have installed the Fish Shell on your Windows.
Now just run the command fish
in Ubuntu Terminal (bash or wsl) to access your new shell
Now let's make your terminal look nicer.
We will no longer use the old standard terminal. Click here and install Windows Terminal
- To make some modifications to Fish, it is necessary to install the plugin manager Oh My Fish
Open cmd through Windows Terminal and run wsl
, then fish
to access the Fish Shell.
To continue we need Git
sudo apt install git
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
You can preview and choose another theme by clicking here
However, in this tutorial we'll install and configure the bobthefish theme
omf install bobthefish
Use the command below to enter the fish folder and open it in Windows
cd ~/.config/fish/ && explorer.exe .
Now open the config.fish
file, paste the codes below and then Save the file
if status is-interactive
# Commands to run in interactive sessions can go here
set -g theme_display_git_default_branch yes
set -g theme_title_display_process yes
set -g theme_title_display_path no
set -g theme_title_use_abbreviated_path no
set -g theme_date_format "+%d/%m/%y %H:%M"
set -g theme_display_user yes
set -g theme_display_hostname yes
set -g fish_prompt_pwd_dir_length 6
set -g theme_display_jobs_verbose yes
end
Click here to learn what each command above does
To replace the "errors" [] with Symbols, we need to install a font from Nerd Fonts. We'll install SourceCode Pro (SauceCodePro NF). To see more Fonts click Here
You can install all the styles if you want. I usually install just these three: Regular, Semibold and Bold
After downloading, go to your Downloads folder in Windows and run all the .ttf files to install the font.
Now we can change the terminal font to fix the []
Click on the little arrow > Settings
Click Open JSON file in the lower-left corner of the screen
- Inside "profiles">"default" do the changes below, then Save the file:
- Change the name of the "Ubuntu" you installed to Fish (or any other)
- Add the theme (colorScheme) "Campbell"
- Add the guid of Fish to be the default Windows Terminal Profile
If you want your Terminal to be translucent, add the values below inside "defaults"
Note: Transparency effects must be enabled in Windows for this to work: Start Menu > Settings > Personalization > Colors
"defaults": {
"opacity": 50,
"useAcrylic": true,
"font": {
"face": "SauceCodePro Nerd Font"
}
},
"list":
[
{
"colorScheme": "Campbell",
"icon": "https://avatars.githubusercontent.com/u/11728505?s=48&v=4",
"guid": "{51855cb2-8cce-5362-8f54-464b92b32386}",
"name": "Fish",
"hidden": false,
"source": "CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc"
}
]
chsh -s /usr/bin/fish
You can choose between two symbol styles: PowerLine Fonts or Nerd Fonts
set -g theme_powerline_fonts yes
or
set -g theme_nerd_fonts yes
Note: Use
yes
to enable andno
to disable (sets only one as YES)