Skip to main content

Oh My Posh × Windows Terminal setup guide

What is Oh My Posh?

Oh My Posh is a cross-platform prompt engine for terminals. It customises what shows up before each command line — colours, icons, Git status, execution time, language versions, and so on. It supports PowerShell, Bash, Zsh, Fish, and other mainstream shells, and runs on Windows, macOS, and Linux.


Background: PL vs NF fonts

SuffixFull nameContentsWhen to use
PLPowerlinePowerline symbols (arrow separators, Git branch glyphs, etc.)Basic prompt decoration only
NFNerd FontPowerline symbols + thousands of extra icons (Font Awesome, Devicons, Material Design Icons, etc.)TUI tools, nvim plugins, full icon coverage

PL ⊂ NF, so just install the NF version — it covers everything.


Installation

Step 1: Install PowerShell 7

winget install Microsoft.PowerShell

After installation, restart Windows Terminal — the dropdown will show a new "PowerShell" entry (distinct from the built-in "Windows PowerShell 5.1").

Configure the Windows Terminal profile

Add the following under profileslist in Windows Terminal's settings.json:

{
"commandline": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"font": {
"face": "Cascadia Mono NF"
},
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell 7"
}

Note: pwsh.exe may fail to launch due to PATH issues — use the full path C:\\Program Files\\PowerShell\\7\\pwsh.exe to be safe.

To make it the default profile:

"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}"

Step 2: Allow script execution

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Confirm with Y.

Step 3: Install Oh My Posh

winget install JanDeDobbeleer.OhMyPosh

After installation, fully close and reopen Windows Terminal so the new PATH takes effect.

Step 4: Install a Nerd Font

Oh My Posh ships with a built-in font installer. The official recommendation is Meslo LGM NF:

oh-my-posh font install meslo

Already-installed Cascadia Mono NF / Cascadia Code NF work just as well.

Step 5: Set the Windows Terminal font

Open Windows Terminal settings (Ctrl + ,) → select the PowerShell 7 profile → AppearanceFont face, and pick the Nerd Font you installed.

Or set it directly in settings.json:

"font": {
"face": "Cascadia Mono NF"
}

Step 6: Create a PowerShell profile and enable Oh My Posh

Create the profile file (if it doesn't already exist):

New-Item -Path $PROFILE -Type File -Force

Edit the profile:

notepad $PROFILE

Add the following (using the atomic theme as an example):

oh-my-posh init pwsh --config atomic | Invoke-Expression

Save and reopen Terminal — it will take effect immediately.


Picking a theme

Browse themes

Load a theme by name — it'll be downloaded and cached on startup:

oh-my-posh init pwsh --config <theme-name> | Invoke-Expression

Or browse screenshots on the official themes page: ohmyposh.dev/docs/themes

ThemeHighlights
jandedobbeleerThe author's default — the classic
powerlevel10k_modernInformation-dense: Git / language version / execution time. Most popular in the dev community
paradoxTwo-line prompt, full path + Git status
draculaDracula palette, good for a unified look across tools
atomicClean and minimal with pleasant colours

Switching themes

Edit $PROFILE and swap the theme name:

oh-my-posh init pwsh --config paradox | Invoke-Expression

CMD has no native prompt customisation, so you need Clink as a bridge:

  1. Install Clink (pick the autostart option during install)
  2. In CMD, run clink info to find the scripts directory
  3. Create oh-my-posh.lua:
load(io.popen('oh-my-posh init cmd'):read("*a"))()
  1. Reopen CMD to take effect

Just use PowerShell 7 — the experience is much better.


Troubleshooting

ProblemFix
running scripts is disabledSet-ExecutionPolicy RemoteSigned -Scope CurrentUser
The system cannot find the file specifiedProfile doesn't exist — run New-Item -Path $PROFILE -Type File -Force first
pwsh.exe won't launchUse the full path C:\Program Files\PowerShell\7\pwsh.exe
Icons render as boxes Windows Terminal font isn't set to a Nerd Font
Get-PoshThemes not recognisedLegacy command — newer versions use the theme name directly, or browse on the website
Oh My Posh installed but command not foundCheck the path with Get-Command oh-my-posh; you may need to reopen Terminal