The starship prompt is a cross-shell, lightning-fast prompt generator written in Rust that displays Git status, package manager versions, container contexts, and execution durations with minimal resource footprint. In newly deployed minimal Linux installations, container base images, or remote VPS servers, running starship or opening a terminal session where starship init is scripted yields bash: starship: command not found because the binary is not part of default Linux distributions.
Install starship via Official Automated Install Script
The cleanest approach for minimal systems fetches the pre-compiled static binary directly without compiling Rust dependencies:
# Download and install starship to /usr/local/bin
curl -sS https://starship.rs/install.sh | sh -s -- -y
# Verify executable execution permissions
sudo chmod +x /usr/local/bin/starship
# Verify installation
starship --version
Configure Starship Shell Hook in Bash Profile
Installing the binary alone does not render the custom prompt; the shell hook must be appended to your profile:
- Append the shell initialization hook to your user configuration:
echo 'eval "$(starship init bash)"' >> ~/.bashrc source ~/.bashrc - For Zsh environments, append
eval "$(starship init zsh)"to~/.zshrcinstead. - For Fish users, add
starship init fish | sourceto~/.config/fish/config.fish. - Your terminal prompt will instantly transform into the dynamic Starship prompt.
Install via Linux Distribution Package Managers
Modern Linux package registries also include starship natively:
# On Arch Linux:
sudo pacman -S starship
# On Alpine Linux:
apk add starship
# On systems with Homebrew:
brew install starship