Skip to content

Installation

Starship can be installed on virtually any platform through multiple methods. This guide covers installation and shell configuration for all major environments.

Prerequisites

Starship uses symbols that require a patched font for proper display. Install a Nerd Font for the best experience:

Popular choices:

  • FiraCode Nerd Font
  • JetBrainsMono Nerd Font
  • Hack Nerd Font
  • MesloLGS Nerd Font

Installation:

brew tap homebrew/cask-fonts
brew install --cask font-fira-code-nerd-font

Download from nerdfonts.com and install to ~/.local/share/fonts/:

mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
curl -fLo "FiraCode Nerd Font Regular.ttf" \
  https://github.com/ryanoasis/nerd-fonts/raw/HEAD/patched-fonts/FiraCode/Regular/FiraCodeNerdFont-Regular.ttf
fc-cache -fv

After installation, configure your terminal emulator to use the Nerd Font.

No Nerd Font?

Starship works without Nerd Fonts, but some symbols won't display correctly. You can configure text-only symbols in your configuration. See the Styling guide for alternatives.

Installation Methods

Package Managers

brew install starship
sudo port install starship
brew install starship
pacman -S starship
dnf install starship

Starship is not in the default repositories. Use the install script or Cargo:

curl -sS https://starship.rs/install.sh | sh
apk add starship
scoop install starship
choco install starship
winget install --id Starship.Starship

Install Script

The official install script works on Linux and macOS:

curl -sS https://starship.rs/install.sh | sh

With options:

# Install to custom location
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /usr/local/bin

# Install specific version
curl -sS https://starship.rs/install.sh | sh -s -- --version v1.16.0

# Force reinstall
curl -sS https://starship.rs/install.sh | sh -s -- --force

Cargo (Rust)

If you have Rust installed:

cargo install starship --locked

Update existing installation:

cargo install starship --locked --force

Binary Download

Download precompiled binaries from the GitHub releases page:

# Example for Linux x86_64
curl -LO https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz
tar xzf starship-x86_64-unknown-linux-gnu.tar.gz
sudo mv starship /usr/local/bin/

Shell Configuration

After installing the binary, configure your shell to use Starship.

Bash

Add to the end of ~/.bashrc:

eval "$(starship init bash)"

Login vs Non-Login Shells

On some systems, you may need to add this to ~/.bash_profile as well for login shells.

Zsh

Add to the end of ~/.zshrc:

eval "$(starship init zsh)"

Fish

Add to ~/.config/fish/config.fish:

starship init fish | source

PowerShell

Add to your PowerShell profile (find location with $PROFILE):

Invoke-Expression (&starship init powershell)

Nushell

Add to your Nushell config:

mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu

Then add to config.nu:

use ~/.cache/starship/init.nu

Cmd (Windows)

Requires Clink. Add to the Clink startup script:

load(io.popen('starship init cmd'):read("*a"))()

Configuration File

Create the configuration directory and file:

mkdir -p ~/.config
touch ~/.config/starship.toml

Alternative locations:

Starship looks for configuration in this order:

  1. $STARSHIP_CONFIG environment variable
  2. ~/.config/starship.toml
  3. $XDG_CONFIG_HOME/starship.toml

Use a custom location:

export STARSHIP_CONFIG=~/dotfiles/starship.toml

Verifying Installation

Check the installed version:

starship --version

Test the initialization:

starship init bash  # or zsh, fish, etc.

This should output initialization code. If it does, restart your shell or source your configuration:

source ~/.bashrc  # or ~/.zshrc

Updating Starship

brew upgrade starship
curl -sS https://starship.rs/install.sh | sh
cargo install starship --locked --force

Uninstalling

Remove the Binary

brew uninstall starship
sudo rm /usr/local/bin/starship
cargo uninstall starship

Clean Up Configuration

Remove the shell initialization line from your shell config file.

Optionally remove the configuration:

rm ~/.config/starship.toml

Platform-Specific Notes

macOS

  • Use iTerm2 or another terminal that supports true color
  • Configure the font in Terminal Preferences or iTerm2 Profiles
  • The default Terminal.app has limited color support

Linux

  • Most modern terminals support true color
  • If using a tiling window manager, ensure your terminal supports Nerd Fonts
  • On servers, consider using a minimal configuration without Nerd Font symbols

Windows

  • Windows Terminal is recommended for best results
  • Ensure you're using PowerShell 7+ for full feature support
  • WSL works well with Starship (configure your Linux shell inside WSL)

SSH Sessions

Starship works over SSH, but:

  • The remote server needs Starship installed
  • Your local terminal needs the Nerd Font configured
  • Consider a minimal configuration for slow connections

Next Steps