---
title: Oh My Posh × Windows Terminal setup guide
title_en: Oh My Posh × Windows Terminal setup guide
description: Set up Windows Terminal with PowerShell 7, Oh My Posh, and a Nerd Font for a polished, cross-shell prompt with themes.
sidebar_label: Oh My Posh setup
---

# 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

```powershell
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`:

```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:

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

### Step 2: Allow script execution

```powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
```

Confirm with `Y`.

### Step 3: Install Oh My Posh

```powershell
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:

```powershell
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`:

```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):

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

Edit the profile:

```powershell
notepad $PROFILE
```

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

```powershell
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:

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

Or browse screenshots on the official themes page: [ohmyposh.dev/docs/themes](https://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:

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

---

## CMD support (via Clink)

CMD has no native prompt customisation, so you need [Clink](https://github.com/chrisant996/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`:

```lua
load(io.popen('oh-my-posh init cmd'):read("*a"))()
```

4. 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 |
