How to install Starship Shell Prompt on Ubuntu

Starship is a free and open source shell prompt for Linux, MacOS and Windows. It is a light weight, fast and highly customizable prompt for any shell. It is released under ISC License and written in Rust. You can customizable every thing in starship and it is feature-rich shell prompt. It supports almost all operation systems and shells like bash, fish, Zsh, powershell and ion. You can integrate with git and shows the current battery level and status. It comes with background jobs indicator and Powerline font support.

Install Starship Shell Prompt on Ubuntu

Installation of Starship Shell Prompt is a easy process. Open the terminal app (ctrl+alt+t) and run this command to update the software source list.

sudo apt update

The number one prerequistes for Starship is powerline font. You need to install and enable any powerline font in your terminal. Here we are installaing Fira Code. Run this command to install Fira Code on Ubuntu.

sudo apt install fonts-firacode

Then run below command to install curl.

sudo apt install curl

After the installation run this Starship Shell Prompt installation script.

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

To continue the installation press y and hit the enter key when asked.

Also Read:  Battery Info - Shows System Battery Details

Restart your terminal.

Then add the init script to your shell’s config file.

Bash: Add the following to the end of ~/.bashrc:

# ~/.bashrc
eval "$(starship init bash)"

Fish: Add the following to the end of ~/.config/fish/config.fish:

# ~/.config/fish/config.fish
starship init fish | source

Zsh:Add the following to the end of ~/.zshrc:

# ~/.zshrc
eval "$(starship init zsh)"

Powershell: Add the following to the end of ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1

# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)

Ion: Add the following to the end of ~/.config/ion/initrc:

# ~/.config/ion/initrc
eval $(starship init ion)

You can configure starship shell prompt by creating below config file.

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

For the complete config details, please visit here

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



Leave a Reply