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
| Suffix | Full name | Contents | When to use |
|---|---|---|---|
| PL | Powerline | Powerline symbols (arrow separators, Git branch glyphs, etc.) | Basic prompt decoration only |
| NF | Nerd Font | Powerline 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 profiles → list 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.exemay fail to launch due to PATH issues — use the full pathC:\\Program Files\\PowerShell\\7\\pwsh.exeto 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 → Appearance → Font 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
Popular themes
| Theme | Highlights |
|---|---|
jandedobbeleer | The author's default — the classic |
powerlevel10k_modern | Information-dense: Git / language version / execution time. Most popular in the dev community |
paradox | Two-line prompt, full path + Git status |
dracula | Dracula palette, good for a unified look across tools |
atomic | Clean and minimal with pleasant colours |
Switching themes
Edit $PROFILE and swap the theme name:
oh-my-posh init pwsh --config paradox | Invoke-Expression
CMD support (via Clink)
CMD has no native prompt customisation, so you need Clink as a bridge:
- Install Clink (pick the autostart option during install)
- In CMD, run
clink infoto find the scripts directory - Create
oh-my-posh.lua:
load(io.popen('oh-my-posh init cmd'):read("*a"))()
- Reopen CMD to take effect
Just use PowerShell 7 — the experience is much better.
Troubleshooting
| Problem | Fix |
|---|---|
running scripts is disabled | Set-ExecutionPolicy RemoteSigned -Scope CurrentUser |
The system cannot find the file specified | Profile doesn't exist — run New-Item -Path $PROFILE -Type File -Force first |
pwsh.exe won't launch | Use 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 recognised | Legacy command — newer versions use the theme name directly, or browse on the website |
| Oh My Posh installed but command not found | Check the path with Get-Command oh-my-posh; you may need to reopen Terminal |