Starship Prompt vs Default: Why It's Better
In this article
The default terminal prompt on Linux and macOS shows basic info—username, hostname, and the current directory. Starship is a cross-shell prompt that adds Git status, language versions, command duration, and error indicators, all in a fast, customizable, and easy-to-read format. This guide explains why Starship beats the default and walks you through installing and configuring it.
What You'll Need
- A Linux or macOS computer with terminal access.
- Internet connection to download Starship.
- Basic familiarity with editing config files (optional but helpful).
- For macOS, Homebrew installed (recommended).
Step-by-Step
- Install Starship – On macOS with Homebrew, run
brew install starship. On Linux, use the official installer:curl -sS https://starship.rs/install.sh | sh. Alternatively, download the binary from the GitHub releases page. - Add Starship to your shell – After installation, you need to enable it in your shell's config file. For Bash, add
eval "$(starship init bash)"to~/.bashrc. For Zsh, addeval "$(starship init zsh)"to~/.zshrc. For Fish, addstarship init fish | sourceto~/.config/fish/config.fish. - Reload your shell – Run
source ~/.bashrc(or the equivalent for your shell) or simply open a new terminal window. You should see the Starship prompt appear immediately. - Test the default features – Navigate into a Git repository and notice the branch name and status (e.g.,
mainwith a green checkmark if clean). Run a command that fails (likels /nonexistent) and see the error symbol appear. These are things the default prompt doesn't show. - Customize the prompt – Create a config file at
~/.config/starship.toml. Start with a simple change, like setting a custom prompt symbol: add[character]andsuccess_symbol = "[➜](bold green)". Save and reload your shell to see the change. - Add language versions – If you use Node.js, Python, or Rust, Starship automatically shows the version when you're in a directory with a relevant file (like
package.jsonorpyproject.toml). You can disable or reorder these modules in the config. - Enable command duration – Add
[cmd_duration]to your config and setmin_time_to_notify = 2000(milliseconds). This shows how long a command took if it exceeded 2 seconds—useful for spotting slow builds or scripts. - Set a custom theme – Starship has preset themes. You can try one by copying the contents of a theme file (like
nordorgruvbox) into yourstarship.toml. Find them in the official documentation. - Make it work with multiple shells – If you switch between Bash and Zsh, Starship works consistently because it's configured once in
starship.toml, not per shell.
Common Mistakes
- Forgetting to reload the shell – After editing config files, you must reload the shell or open a new terminal. Otherwise changes don't appear.
- Using the wrong init command – Each shell has its own syntax. Using
eval "$(starship init bash)"in Zsh will fail. Double-check your shell type withecho $SHELL. - Overwriting the default config – If you copy a preset theme, make sure you don't lose your custom settings. Merge them carefully or back up your original file.
- Expecting instant updates – Starship caches some info. If you change a Git branch, the prompt updates immediately, but if you change a config file, you need to reload.
Tips
- Use the
starship configcommand to view your current settings and validate the TOML syntax. - Keep your prompt minimal—too many modules can slow it down, though Starship is designed to be fast.
- Use the
formatoption in config to reorder modules. For example, put the directory first if you want it prominent. - If you use a terminal multiplexer like tmux, Starship works seamlessly because it's shell-agnostic.
- Check the official Starship documentation for a full list of modules and options—it's well organized and includes examples.
Troubleshooting
If the prompt doesn't appear after installation, try these steps in order:
- Verify installation – Run
starship --version. If it fails, reinstall using the official method. - Check your shell config – Ensure the init line is exactly correct and placed at the end of the file. A typo (like a missing quote) can break the shell startup.
- Test with a clean shell – Start a new terminal session (not just a new tab) to avoid inherited environment issues.
- Look for errors – Run
starship init bash(replace with your shell) manually and see if it outputs any error messages. - Check for conflicting prompts – If you have another prompt tool (like Powerlevel10k or oh-my-zsh), disable it first, as it may override Starship.
- If all else fails – Uninstall and reinstall, then add the init line again. This usually resolves any partial installation issues.
Frequently Asked Questions
Does Starship slow down my terminal?
No. Starship is written in Rust and is designed to be fast, typically adding less than 10ms per prompt. It only runs when the prompt is displayed, not continuously.
Can I use Starship with multiple shells?
Yes. Starship works with Bash, Zsh, Fish, and many others. You configure it once in starship.toml, and it applies to all shells.
How do I change the prompt symbol?
Edit your starship.toml and add a [character] section. Set success_symbol to any string, like [➜](bold green).
Can I hide the hostname?
Yes. In the [hostname] section of your config, set disabled = true.
Does Starship work with Windows?
Yes, it works with PowerShell and Windows Terminal, but this guide focuses on Linux and macOS. The installation steps differ slightly.
How do I update Starship?
If you installed via Homebrew, run brew upgrade starship. For the installer method, re-run the install script, which updates the binary.