Skip to content

> A super complete tutorial on how to install Fish Shell on Windows (WSL), Linux and Mac, and configure Terminal's appearance | | | > Um tutorial super completo de como instalar o Fish Shell no Windows (WSL), Linux e Mac e configurar o visual do Terminal

Notifications You must be signed in to change notification settings

AlexanOliveira/fish-shell-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Installing Fish on Windows (WSL) - A Complete step by step for Beginners (or not)

{ Versão em Português }

When you finish this Tutorial, you'll go from this:

ugly cmd

To this:

final_627913e0199a88007600ec03_565928


About

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.

Installation

Microsoft Documentation


1) Installing WSL (Windows Subsystem for Linux)

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


2) Configuring Ubuntu

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

1

3) Installing Fish

Fish Documentation


Open cmd and run the command bash or wsl to access your Linux (Ubuntu) environment

Installing the Fish repository
sudo apt-add-repository ppa:fish-shell/release-3

Note: if apt-add-repository is a not found command run sudo apt-get install software-properties-common


Checking and Installing Updates
sudo apt-get update && sudo apt-get upgrade

Installing Fish
sudo apt-get 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.

1) Installing Windows Terminal

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

2) Installing Oh My Fish (omf)

Oh My Fish Documentation


Open Windows Terminal and run fish to access the Fish Shell.

To continue we need Git

sudo apt-get install git
Installing omf
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish

3) Installing the Theme

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

4) Configuring bobthefish Theme

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

This will be the result

2


5) Installing Nerd Font

Nerd Fonts Documentation


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

Enter the folders Italic/complete Bold/complete Normal/complete SemiBold/complete and download the penultimate Font (ending with "Complete Windows Compatible.ttf")

Go to your Download folder and run all .ttf files to install the font.


6) Configuring Windows Terminal

Now we can change the terminal font to fix the []

Click on the little arrow > Settings 3

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

json terminal

If you want your Terminal to be translucent, add the values ​​below inside "defaults"

Note: Transparency effects must be enabled for this to work. Start Menu > Settings > Personalization > Colors

//"defaults": {
	"opacity": 50,
	"useAcrylic": true,
	"acrylicOpacity": 0.5,
//}
Sets Fish as default Shell on Windows Terminal
chsh -s /usr/bin/fish

7) Configuring Symbols (Font)

You can choose between two symbol styles: PowerLine Fonts or Nerd Fonts

set -g theme_powerline_fonts yes

5

or

set -g theme_nerd_fonts yes

6

Note: Use yes to enable and no to disable (sets only one as YES)



About

> A super complete tutorial on how to install Fish Shell on Windows (WSL), Linux and Mac, and configure Terminal's appearance | | | > Um tutorial super completo de como instalar o Fish Shell no Windows (WSL), Linux e Mac e configurar o visual do Terminal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published