Setting up Oh-My-Posh on Windows
September 17, 2025

Setting up Oh-My-Posh on Windows

This tutorial explains how to install and configure Oh-My-Posh on Windows, along with fonts, icons, and suggestions to customize your terminal with a modern and functional look.

Prerequisites

  • Updated Windows 10/11
  • Windows Terminal (from Microsoft Store)
  • PowerShell (latest version from Microsoft Store)

1. Install and configure Windows Terminal

  1. Open Microsoft Store
  2. Install Windows Terminal
  3. Also install PowerShell (New)
  4. Open Windows Terminal
  5. In settings:
    • Default profile → PowerShell
    • Default terminal application → Windows Terminal
    • Save changes
  6. Optional: Enable transparency in the tab
    • Settings → Appearance → Use acrylic material in the tab row

2. Install Oh My Posh

Run in PowerShell (as administrator):

winget install JanDeDobbeleer.OhMyPosh -s winget

Then, install recommended fonts:

oh-my-posh font install

Example: choose Fira Code Nerd Font.

Then update the font in Windows Terminal: Settings → Profiles → PowerShell → Appearance → Font face → FiraCode Nerd Font Mono.

3. Define themes path

If you don’t have the environment configured, define the path:

$env:POSH_THEMES_PATH = "C:\Users\<YOUR_USER>\AppData\Local\Programs\oh-my-posh\themes"

4. Configure PowerShell profile file

Check if the profile exists:

Test-Path $PROFILE

If it returns False, create it:

New-Item -ItemType Directory -Path (Split-Path $PROFILE) -Force
New-Item -ItemType File -Path $PROFILE -Force

Add Oh My Posh configuration:

Add-Content -Path $PROFILE -Value 'oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\spaceship.omp.json" | Invoke-Expression'

Verify:

Get-Content $PROFILE

5. Enhance experience with icons and autocomplete

Install icons for directories and files:

Install-Module -Name Terminal-Icons -Repository PSGallery
Import-Module Terminal-Icons

Add this line to the profile:

notepad $PROFILE

Add:

Import-Module Terminal-Icons

Enable command predictions in list style:

Set-PSReadLineOption -PredictionViewStyle ListView

6. Final configuration file

The $PROFILE file should contain the following:

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\spaceship.omp.json" | Invoke-Expression
Import-Module Terminal-Icons
Set-PSReadLineOption -PredictionViewStyle ListView

7. Reload profile

Apply changes without restarting PowerShell:

. $PROFILE

Done! 🎉

The terminal should now have a modern and functional look with Oh My Posh configured correctly.

Final Oh My Posh result