How to install Starship Shell Prompt on Ubuntu

Starship is a free open source shell prompt for Linux, MacOS and Windows. This is a lightweight, fast, and highly customizable shell prompt. Released under the ISC license, written in Rust. You can customize everything in the spaceship, which is a feature rich shell prompt. It supports almost all operating systems and shells such as bash, fish, Zsh, powershell, and ion. You can integrate with git to view current battery level and status. It comes with background job indicator and Powerline font support.

Install Starship Shell prompt on Ubuntu

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

sudo apt update

The first prerequisite for Starship is Powerline fonts. You need to install and enable Powerline fonts on your device. Fira Code is installed here. Run this command to install the Fira code on Ubuntu.

sudo apt install fonts-firacode

After installation, run this Starship Shell Prompt installation script.

curl -fsSL https://starship.rs/install.sh | bash

Press y to continue the installation and press Enter when prompted.

Recommended reading: How to install FeatherPad text editor on Ubuntu

Restart the terminal.

Then add the init script to your shell’s configuration 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)"

Power shell: Add the following to the end of ~DocumentsPowerShellMicrosoft.PowerShell_profile.ps1

# ~DocumentsPowerShellProfile.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 the starship shell prompt by creating the following configuration file.

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

For details on the settings, Have a look at this

If you like this article, please subscribe to us Youtube channel.. You can also stay connected with us twitter And Facebook..

It’s a sequel.

..

Sidebar