The Terminal on Windows
Windows has two separate things that people call "the terminal": the shells (Command Prompt cmd.exe, Windows
PowerShell 5.1, PowerShell 7) and the window they run in. For decades that window was the old console host
(conhost.exe). Since Windows 11 22H2, the default window is Windows Terminal, a modern app with tabs, split
panes, profiles, themes, Unicode and GPU text rendering.
+------------------------- Windows Terminal --------------------------+
| [ PowerShell ] [ Command Prompt ] [ Ubuntu ] [ + v ] | <- tabs, one profile each
|----------------------------------+----------------------------------|
| PS C:\Users\ada> git status | ada@laptop:~$ make test | <- split panes
| | |
+----------------------------------+----------------------------------+
pwsh.exe wsl.exe -d Ubuntu <- the shells it startsGetting it
- Windows 11: preinstalled. Right-click the Start button and choose Terminal (or Terminal (Admin)), or
press Win+X then I. Typing
wtin the Run box (Win+R) works too. - Windows 10: install it from the Microsoft Store or with winget.
- PowerShell 7 is a separate install; Windows ships only Windows PowerShell 5.1. After installing, Windows Terminal adds a "PowerShell" profile for it automatically.
PS C:\Users\ada> winget install --id Microsoft.WindowsTerminal -e
PS C:\Users\ada> winget install --id Microsoft.PowerShell -eTo make Windows Terminal the window for every console program (including ones launched from Explorer), open Settings → Startup → Default terminal application → Windows Terminal.
Profiles
A profile is one entry in the new-tab menu: which program to start, in which folder, with which colours and font. Windows Terminal generates profiles for Windows PowerShell, Command Prompt, PowerShell 7, every installed WSL distribution, Azure Cloud Shell and Visual Studio developer prompts. You can add your own, for example one that opens Git Bash or SSHes into a server.
The settings UI (Ctrl+,) writes everything to a JSON file, settings.json (button "Open JSON
file" at the bottom left). Editing it directly is often faster:
{
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", // PowerShell 7
"copyOnSelect": true,
"profiles": {
"defaults": { "font": { "face": "Cascadia Mono", "size": 11 } },
"list": [
{ "name": "PowerShell", "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"source": "Windows.Terminal.PowershellCore", "startingDirectory": "%USERPROFILE%\\projects" },
{ "name": "Command Prompt", "commandline": "cmd.exe /k %USERPROFILE%\\cmd-init.bat" },
{ "name": "PowerShell (Admin)", "commandline": "pwsh.exe", "elevate": true, "tabColor": "#B91C1C" },
{ "name": "Build server", "commandline": "ssh ada@build.example.com", "icon": "\uE968" }
]
}
}Note the doubled backslashes: in JSON, \ must be written \\. The file allows // comments.
Because settings.json is just JSON, PowerShell 7 can read it like any other data (its ConvertFrom-Json accepts
the comments too). Here the file content is embedded so the example runs anywhere:
$json = @'
{
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"profiles": { "list": [
{ "name": "PowerShell", "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}" },
{ "name": "Command Prompt", "commandline": "cmd.exe" },
// an elevated profile
{ "name": "PowerShell (Admin)", "commandline": "pwsh.exe", "elevate": true },
{ "name": "Ubuntu", "commandline": "wsl.exe -d Ubuntu", "hidden": false }
] }
}
'@
$settings = $json | ConvertFrom-Json
$settings.profiles.list | Select-Object name, commandline, elevate | Format-Table
$default = $settings.profiles.list | Where-Object guid -eq $settings.defaultProfile
"New tabs open: $($default.name)"
name commandline elevate
---- ----------- -------
PowerShell
Command Prompt cmd.exe
PowerShell (Admin) pwsh.exe True
Ubuntu wsl.exe -d Ubuntu
New tabs open: PowerShell
On a real machine the file is at
$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json.
Tabs, panes and keyboard shortcuts
| Keys | Action |
|---|---|
| Ctrl+Shift+T | new tab with the default profile |
| Ctrl+Shift+1…9 | new tab with profile 1…9 |
| Ctrl+Tab / Ctrl+Shift+Tab | next / previous tab |
| Alt+Shift+D | split the current pane (duplicate profile) |
| Alt+Shift++ / - | split vertically / horizontally |
| Alt+arrow | move between panes |
| Ctrl+Shift+W | close the pane or tab |
| Ctrl+Shift+P | command palette: search every action by name |
| Ctrl+Shift+F | find text in the scrollback |
| Ctrl+C / Ctrl+V | copy (when text is selected) / paste |
The wt command opens layouts from a script or shortcut. Subcommands are separated by ;. In PowerShell the
semicolon must be escaped with a backtick, because PowerShell itself uses ; as a separator:
C:\Users\ada> wt -p "PowerShell" -d C:\projects ; split-pane -V -p "Ubuntu" ; new-tab -p "Command Prompt"PS C:\Users\ada> wt -p "PowerShell" -d C:\projects `; split-pane -V -p "Ubuntu"Admin (elevated) tabs
Some commands need administrator rights: installing software for all users, changing services, editing system folders. Windows uses UAC: a normal window runs with your standard rights even if your account is an admin, and an elevated process must be started separately (after a confirmation prompt).
- Right-click Start → Terminal (Admin), or Ctrl+click a profile in the new-tab menu.
- Set
"elevate": trueon a profile (as above) to always open it elevated. - A window is either elevated or not: Windows Terminal opens elevated profiles in a separate window with a shield in the tab, it can't mix both in one window.
- Windows 11 24H2 and later also include Sudo for Windows (turn on "Enable sudo" under Settings → System → For developers, called Advanced on newer builds), so
sudo winget install ...elevates just that one command after a UAC prompt.
Check whether the current PowerShell is elevated:
PS C:\Users\ada> ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
FalseIn CMD, a quick test is net session >nul 2>&1 && echo admin || echo not admin. More in
Admin Rights & Permissions.
Old console vs Windows Terminal
Console host (conhost.exe) |
Windows Terminal | |
|---|---|---|
| Tabs and panes | no | yes |
| Emoji, CJK, ligatures | limited | yes |
| Settings | per-shortcut dialog | settings.json + UI, synced across profiles |
| Text rendering | GDI | GPU (DirectX) |
| Starts | cmd.exe, powershell.exe directly |
any shell, WSL, SSH |
Learn more: Terminal Apps on Every OS, WSL: Linux on Windows, PowerShell Install.
Test yourself
What is a profile in Windows Terminal?
- A user account
- A new-tab entry describing which shell to start and how it looks
- The PowerShell $PROFILE script
- A registry key
Which setting makes a Windows Terminal profile always run as administrator?
- "admin": 1
- "elevate": true
- "runas": "admin"
- "sudo": true
Why is ; escaped as ` ; ` when running wt` from PowerShell?
- wt requires backticks
- PowerShell would treat ; as its own statement separator
- To open an admin tab
- Backticks make a new pane