Sheet ⁨02⁩ · ⁨Blog⁩Surveyed ⁨2026⁩

Blog post image for Customization Windows Terminal With Starship - How to customize Windows Terminal with Starship. Windows Terminal is a modern, fast terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL.

Customization Windows Terminal With Starship

Published: 05 Mins read07 Mins listen
Markdown for AI(opens in a new tab)

Introduction

In this article, we will install PowerShell and Starship, configure Windows Terminal, and then customize it with Starship.

What is Windows Terminal?

Windows Terminal is a modern, fast terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL. It has plenty of features that make it useful for developers and system administrators. It is a solid replacement for the default Windows Command Prompt and PowerShell.

What is Starship?

Starship is a cross-shell prompt for any shell. It shows information about the current directory, the active branch, the status of the repository, and much more. It is highly customizable and can be extended with custom modules. It is written in Rust and is blazingly fast.

Installation

Install Windows Terminal

To install Windows Terminal, you can download it from the Microsoft Store or from the GitHub repository, or you can use the Chocolatey package manager or Winget package manager.

Install Windows Terminal from the Microsoft Store

To install Windows Terminal from the Microsoft Store, you can follow the steps below:

  1. Open the Microsoft Store.
  2. Search for Windows Terminal.
  3. Click on the Get button.

Install Windows Terminal from GitHub

To install Windows Terminal from GitHub, you can follow the steps below:

  1. Open the GitHub repository.
  2. Click on the Releases tab.
  3. Click on the latest release.
  4. Click on the WindowsTerminal.exe file.
  5. Click on the Download button.

Install Windows Terminal with Chocolatey

To install Windows Terminal with Chocolatey, you can follow the steps below:

  1. Open the Chocolatey website.
  2. Click on Packages.
  3. Search for Windows Terminal.
  4. Click on the command to install Windows Terminal.
  5. Run the command in CMD.
Terminal window
choco install microsoft-windows-terminal --pre -y

Install Windows Terminal with Winget

To install Windows Terminal with Winget, you can follow the steps below:

  1. Open the Winget website.
  2. Search for Windows Terminal.
  3. Click on the command to install Windows Terminal.
  4. Run the command in CMD.
Terminal window
winget install --id=Microsoft.WindowsTerminal -e

Install PowerShell

To install PowerShell, you can download it from the Microsoft Store or from the GitHub repository, or you can use the Chocolatey package manager or Winget package manager.

Install PowerShell from the Microsoft Store

To install PowerShell from the Microsoft Store, you can follow the steps below:

  1. Open the Microsoft Store.
  2. Search for PowerShell.
  3. Click on the Get button.

Install PowerShell from GitHub

To install PowerShell from GitHub, you can follow the steps below:

  1. Open the GitHub repository.
  2. Click on the Releases tab.
  3. Click on the latest release.
  4. Click on the PowerShell-7.2.0-win-x64.msi file.
  5. Click on the Download button.

Install PowerShell with Chocolatey

To install PowerShell with Chocolatey, you can follow the steps below:

  1. Open the Chocolatey website.
  2. Click on Packages.
  3. Search for PowerShell.
  4. Click on the command to install PowerShell.
  5. Run the command in CMD.
Terminal window
choco install powershell -y

Install PowerShell with Winget

To install PowerShell with Winget, you can follow the steps below:

  1. Open the Winget website.
  2. Search for PowerShell.
  3. Click on the command to install PowerShell.
  4. Run the command in CMD.
Terminal window
winget install --id=Microsoft.PowerShell -e

Install Starship

To install Starship, you can download it from the GitHub repository, or you can use the Chocolatey package manager or Winget package manager.

Install Starship from GitHub

To install Starship from GitHub, you can follow the steps below:

  1. Open the GitHub repository.
  2. Click on the Releases tab.
  3. Click on the latest release.
  4. Click on the starship-x86_64-pc-windows-msvc.zip file.
  5. Click on the Download button.

Install Starship with Chocolatey

To install Starship with Chocolatey, you can follow the steps below:

  1. Open the Chocolatey website.
  2. Click on Packages.
  3. Search for Starship.
  4. Click on the command to install Starship.
  5. Run the command in CMD.
Terminal window
choco install starship -y

Install Starship with Winget

To install Starship with Winget, you can follow the steps below:

  1. Open the Winget website.
  2. Search for Starship.
  3. Click on the command to install Starship.
  4. Run the command in CMD.
Terminal window
winget install --id=Starship.Starship -e

Install a Nerd Font

Install a Nerd Font quickly from the Nerd Fonts website. You can choose any font you like. I will use the Caskaydia Cove Nerd Font font.

Configuration

Configure Starship

To configure Starship, you can follow the steps below:

  1. Open PowerShell.
  2. Run the command below to create the configuration file.
Terminal window
mkdir -p ~/.config && touch ~/.config/starship.toml
  1. Open the configuration file with your favorite text editor.
Terminal window
notepad ~/.config/starship.toml
  1. Copy the configuration below and paste it in the configuration file. GitHub | starship.toml
~/.config/starship.toml
#
# .
# .. .''
# .,'..,. ..,;,'
# ,;;;;,, .,,;;;
# ,;;;;;' .',;;;
# ,;;;;,'...,;;;,
# ,;;;;;,,;;;;.
# ,;;;;;;;;;
# .,;;;;;;;
# .,;;;;;;;'
# .,;;;;;;;,'
# .',;;;;;;;;;;,.
# ..,;;;;;;;;;;;;;,.
# .';;;;;. ';;;;;;,'
# .,;;;;. ,; .;; .,
# ',;;;. .
# .,;;.
# ,;
#
## FIRST LINE/ROW: Info & Status
# First param ─┌
[username]
format = " [╭─$user]($style)@"
show_always = true
style_root = "bold red"
style_user = "bold red"
# Second param
[hostname]
disabled = false
format = "[$hostname]($style) in "
ssh_only = false
style = "bold dimmed red"
trim_at = "-"
# Third param
[directory]
style = "purple"
truncate_to_repo = true
truncation_length = 0
truncation_symbol = "repo: "
# Fourth param
[sudo]
disabled = false
# Before all the version info (python, nodejs, php, etc.)
[git_status]
ahead = "⇡${count}"
behind = "⇣${count}"
deleted = "x"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
style = "white"
# Last param in the first line/row
[cmd_duration]
disabled = false
format = "took [$duration]($style)"
min_time = 1
## SECOND LINE/ROW: Prompt
# Somethere at the beginning
[battery]
charging_symbol = ""
disabled = true
discharging_symbol = ""
full_symbol = ""
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
disabled = false
style = "bold red"
threshold = 15
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
disabled = true
style = "bold yellow"
threshold = 50
[[battery.display]] # "bold green" style when capacity is between 10% and 30%
disabled = true
style = "bold green"
threshold = 80
# Prompt: optional param 1
[time]
disabled = true
format = " 🕙 $time($style)\n"
style = "bright-white"
time_format = "%T"
# Prompt: param 2
[character]
error_symbol = " [×](bold red)"
success_symbol = " [╰─λ](bold red)"
# SYMBOLS
[status]
disabled = false
format = '[\[$symbol$status_common_meaning$status_signal_name$status_maybe_int\]]($style)'
map_symbol = true
pipestatus = true
symbol = "🔴"
[aws]
symbol = ""
[conda]
symbol = ""
[dart]
symbol = ""
[docker_context]
symbol = ""
[elixir]
symbol = ""
[elm]
symbol = ""
[git_branch]
symbol = ""
[golang]
symbol = ""
[hg_branch]
symbol = ""
[java]
symbol = ""
[julia]
symbol = ""
[nim]
symbol = ""
[nix_shell]
symbol = ""
[nodejs]
symbol = ""
[package]
symbol = ""
[perl]
symbol = ""
[php]
symbol = ""
[python]
symbol = ""
[ruby]
symbol = ""
[rust]
symbol = ""
[swift]
symbol = ""

Configure Starship on PowerShell

Every time a PowerShell instance launches, we need to initialize Starship. To do that, we’ll add the following line to our PowerShell profile.

To create a PowerShell profile and add the Starship line, you can follow the steps below:

  1. Open Windows Terminal.
  2. Run the following command to create a PowerShell profile.
Terminal window
New-Item -Path $PROFILE -ItemType File -Force
  1. Use the Set-Content cmdlet to add the line to the profile.
Terminal window
$CONFIG_PROFILE = {function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)}
Set-Content -Path $PROFILE -Value $CONFIG_PROFILE

Note

You can check the location of this file by querying the $PROFILE variable in PowerShell. The path is often ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1.

Configure PowerShell on Windows Terminal

To configure PowerShell on Windows Terminal, you can follow the steps below:

  1. Open Windows Terminal.
  2. Press Ctrl + , to open the settings.
  3. Click on settings.json to open the settings file.
  4. Add the following lines to the profiles section.
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore"
}
  1. Change the hidden property to true for the Windows PowerShell profile.
{
"commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": true,
"name": "Windows PowerShell"
}
  1. Add Dracula schemes to the schemes section.
{
"background": "#282A36",
"black": "#21222C",
"blue": "#BD93F9",
"brightBlack": "#6272A4",
"brightBlue": "#D6ACFF",
"brightCyan": "#A4FFFF",
"brightGreen": "#69FF94",
"brightPurple": "#FF92DF",
"brightRed": "#FF6E6E",
"brightWhite": "#FFFFFF",
"brightYellow": "#FFFFA5",
"cursorColor": "#F8F8F2",
"cyan": "#8BE9FD",
"foreground": "#F8F8F2",
"green": "#50FA7B",
"name": "Dracula",
"purple": "#FF79C6",
"red": "#FF5555",
"selectionBackground": "#44475A",
"white": "#F8F8F2",
"yellow": "#F1FA8C"
}
  1. Save the file and close it.
  2. Back in Windows Terminal, press Ctrl + , to open the settings.
  3. Go to Profiles >> Defaults >> Appearance >> Color scheme, and choose Dracula.
  4. Go to Profiles >> Defaults >> Appearance >> Font face, and choose Caskaydia Cove Nerd Font.

Settings

Extra configuration

  1. Open Windows Terminal.
  2. Run the command below.
Terminal window
# Allow scripts to run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Install PSReadLine
Install-Module PSReadLine -AllowPrerelease -Force
# Install Terminal-Icons
Install-Module Terminal-Icons -AllowPrerelease -Force
  1. Use the Set-Content cmdlet to add the line to the profile.
Terminal window
$CONFIG_PROFILE = {function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
# set PowerShell to UTF-8
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
Import-Module -Name Terminal-Icons
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -PredictionViewStyle InlineView
Set-PSReadLineOption -EditMode WindowS
Set-PSReadLineKeyHandler -Chord Ctrl+B -ScriptBlock {
[Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
[Microsoft.PowerShell.PSConsoleReadLine]::Insert('build')
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
}
# This is an example of a macro that you might use to execute a command.
# This will add the command to history.
Set-PSReadLineKeyHandler -Key Ctrl+Shift+b `
-BriefDescription BuildCurrentDirectory `
-LongDescription "Build the current directory" `
-ScriptBlock {
[Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
[Microsoft.PowerShell.PSConsoleReadLine]::Insert("dotnet build")
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
}}
Set-Content -Path $PROFILE -Value $CONFIG_PROFILE

Settings

References

Was this useful?

You might also enjoy

More posts on similar topics

Dotfiles: A Git-Based Strategy for Configuration Management

Dotfiles: A Git-Based Strategy for Configuration Management

Introduction Your dotfiles, those hidden .-prefixed configuration files scattered across your home directory, are the muscle memory of your environment. They hold your shell aliases, your editor

VIM Cheat Sheet

VIM Cheat Sheet

What is VIM? VIM (Vi Improved) is a versatile text editor pre-installed on most Linux systems, known for its efficiency in command-line file editing. Its modal nature, switching between modes like

10+ Secret Git Commands That Will Save Hours Every Week

10+ Secret Git Commands That Will Save Hours Every Week

Introduction As a software engineer, DevOps engineer, or GitHub user, you probably use Git daily. But are you making the most of it? Git is packed with commands that can save you hours of manual w

Git SSH Keys for GitHub, GitLab, and Bitbucket on Windows

Git SSH Keys for GitHub, GitLab, and Bitbucket on Windows

Introduction By default, Git talks to remotes over HTTPS, so it asks for your username and password on every git pull or git push. SSH fixes that. GitHub, GitLab, and Bitbucket all let Git aut

How To Connect A EBS Volume To An Windows EC2 Instance Using Powershell/GUI

How To Connect A EBS Volume To An Windows EC2 Instance Using Powershell/GUI

Introduction In this post, we will learn how to connect an EBS volume to a Windows EC2 instance using PowerShell or the Disk Management GUI, and how to mount the volume on the instance. Prereq

Git SSH Keys for GitHub, GitLab, and Bitbucket on Linux

Git SSH Keys for GitHub, GitLab, and Bitbucket on Linux

Introduction By default, Git talks to remotes over HTTPS, so it asks for your username and password on every git pull or git push. SSH fixes that. GitHub, GitLab, and Bitbucket all let Git aut

6 related posts