Skip to content

Instantly share code, notes, and snippets.

@HallexCosta
Last active March 9, 2025 23:18
Show Gist options
  • Save HallexCosta/528fb3c74d4de50c3ba183b1820b46d7 to your computer and use it in GitHub Desktop.
Save HallexCosta/528fb3c74d4de50c3ba183b1820b46d7 to your computer and use it in GitHub Desktop.
Configuring Fish Shell on Ubuntu

Steps to configure shell fish

  1. Install fish and start terminal
brew install fish && fish
  1. Install starship theme
curl -sS https://starship.rs/install.sh | sh
  1. Add fish to etc shell
echo $(which fish) | sudo tee -a /etc/shells
  1. Making fish as default she
chsh -s $(which fish)

If you receive an error like this

chsh: /home/linuxbrew/.linuxbrew/bin/fish is an invalid shell

Try add fish in shells list with command echo $(which fish) | sudo tee -a /etc/shells and then execute the command chsh -s $(which fish) again

  1. Add file starship.toml (optional)

It is the file that I like use, you can use another

# ~/.config/starship.toml
# Inserts a blank line between shell prompts
add_newline = false

[username]
show_always = true

[directory]
truncate_to_repo = true
truncation_length = 3

[container]
disabled = true
  1. Add to the end of ~/.config/fish/config.fish to init starship when fish start
starship init fish | source

Optinal Tools

brew install eza bat asdf rbenv fisher docker docker-compose htop gh lazygit ripgrep tmux nvim
sudo apt install gedit -y
fisher install jethrokuan/z
fisher install rose-pine/fish
# add this in `~/.config/fish/config.fish
# fish_config theme choose "Rosé Pine {Dawn, Moon}"

Add permission to user manipuling Docker without sudo

sudo usermod -aG docker $USER

To check if eza was installed, use the alias exa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment