Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Starship Prompt vs Default: Why It's Better

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

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

  1. 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.
  2. 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, add eval "$(starship init zsh)" to ~/.zshrc. For Fish, add starship init fish | source to ~/.config/fish/config.fish.
  3. 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.
  4. Test the default features – Navigate into a Git repository and notice the branch name and status (e.g., main with a green checkmark if clean). Run a command that fails (like ls /nonexistent) and see the error symbol appear. These are things the default prompt doesn't show.
  5. Customize the prompt – Create a config file at ~/.config/starship.toml. Start with a simple change, like setting a custom prompt symbol: add [character] and success_symbol = "[➜](bold green)". Save and reload your shell to see the change.
  6. 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.json or pyproject.toml). You can disable or reorder these modules in the config.
  7. Enable command duration – Add [cmd_duration] to your config and set min_time_to_notify = 2000 (milliseconds). This shows how long a command took if it exceeded 2 seconds—useful for spotting slow builds or scripts.
  8. Set a custom theme – Starship has preset themes. You can try one by copying the contents of a theme file (like nord or gruvbox) into your starship.toml. Find them in the official documentation.
  9. 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 with echo $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 config command 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 format option 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:

  1. Verify installation – Run starship --version. If it fails, reinstall using the official method.
  2. 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.
  3. Test with a clean shell – Start a new terminal session (not just a new tab) to avoid inherited environment issues.
  4. Look for errors – Run starship init bash (replace with your shell) manually and see if it outputs any error messages.
  5. Check for conflicting prompts – If you have another prompt tool (like Powerlevel10k or oh-my-zsh), disable it first, as it may override Starship.
  6. 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.