Windows Terminal Cheat Sheet
Sidebar
Programming · Windows Terminal Cheat Sheet
Windows Terminal: default key bindings, the settings in settings.json, profiles, actions and the wt command line. Checked against the 1.24 release's schema and default settings, the documentation, and the copy installed here (1.24.11911.0). Not a VS Code sheet, but it sits well beside the VS Code terminal sheet.
Getting Around & Settings Files
Ctrl+,Open the Settings page (the graphical settings)Ctrl+Shift+,Open settings.json (the file you edit by hand)Ctrl+Alt+,Open defaults.json: read-only list of every default setting and key bindingCtrl+Shift+PCommand palette: run any action by nameCtrl+Shift+SpaceOpen the new-tab dropdown (all your profiles)Alt+Enter or F11Full screen on and offWin+` (backtick)Quake mode: a drop-down terminal window from the top of the screenAlt+SpaceThe window's system menusettings.json location%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json for the Store version (found on this machine; version 1.24)"$schema"The first lines of settings.json point to https://aka.ms/terminal-profiles-schema, which gives VS Code completion and checking when you edit the fileTabs & Windows (default keys)
Ctrl+Shift+TNew tab with the default profileCtrl+Shift+1 … 9New tab with the 1st … 9th profile in the dropdownCtrl+Shift+DDuplicate the current tabCtrl+Tab / Ctrl+Shift+TabNext / previous tabCtrl+Alt+1 … 8Switch to tab 1 … 8; Ctrl+Alt+9 goes to the last tabCtrl+Shift+NNew windowCtrl+Shift+WClose the current pane (the tab closes with its last pane)Alt+F4Close the windowPanes (default keys)
Alt+Shift+-Split the pane, duplicating it, with the new pane belowAlt+Shift++Split the pane, duplicating it, with the new pane to the rightAlt+Shift+DSplit in the best direction: not a default; it is the key bound in your settings.json (action Terminal.DuplicatePaneAuto)Alt+Arrow keysMove focus to the pane up, down, left or rightCtrl+Alt+LeftMove focus to the previous paneAlt+Shift+Arrow keysResize the focused paneCopy, Paste & Selection
Ctrl+Shift+C / Ctrl+Insert / EnterCopy the selection (Enter works only while text is selected)Ctrl+Shift+V / Shift+InsertPasteCtrl+C and Ctrl+VRebound to copy and paste in your settings.json; Ctrl+C copies only when text is selected, otherwise it still interrupts a running programCtrl+Shift+ASelect allCtrl+Shift+MMark mode: select text with the keyboardcopyOnSelecttrue copies as soon as you select (default false)copyFormattingCopy colours and fonts too (default true; yours is set to none)trimPaste / trimBlockSelectionRemove trailing spaces when pasting / from a block selection (default true)warning.multiLinePaste / warning.largePasteAsk before pasting several lines / more than 5 KiB (default true)wordDelimitersCharacters that end a word on double-clickMenu keyShows the context menu; right-click pastes or copies unless experimental.rightClickContextMenu is onScrolling, Search & Zoom
Ctrl+Shift+FFind text in the outputCtrl+Shift+Up / DownScroll a line up / downCtrl+Shift+PgUp / PgDnScroll a page up / downCtrl+Shift+Home / EndScroll to the top / bottomCtrl+Shift+KClear the whole bufferCtrl+Plus / Ctrl+Minus / Ctrl+0Make the font larger / smaller / reset ithistorySizeLines of scroll-back (default 9001)snapOnInputJump to the bottom when you type (default true)scrollbarStatevisible (default), hidden, alwaysexperimental.scrollToZoomCtrl + mouse wheel changes the font size (default true)experimental.scrollToChangeOpacityCtrl + Shift + mouse wheel changes the opacity (default true)Startup & Window (global settings)
defaultProfileThe profile for new tabs: its GUID or its namelaunchModedefault, maximized, fullscreen, focus, maximizedFocusinitialCols / initialRowsWindow size in characters (default 120 and 30)initialPosition / centerOnLaunchWhere the window opens, e.g. "200,100" / centre it (default false)firstWindowPreferencedefaultProfile (default), persistedWindowLayout, persistedLayoutAndContentwindowingBehavioruseNew (default), useExisting, useAnyExisting: whether wt opens a new window or a new tabstartupActionsActions to run at start, in command-line style, e.g. "new-tab ; split-pane"newTabPositionafterLastTab (default) or afterCurrentTabalwaysOnTopKeep the window above others (default false)minimizeToNotificationArea / alwaysShowNotificationIconHide from the taskbar when minimised / always show the tray icon (default false)warning.confirmCloseAllTabsAsk before closing a window with several tabs (default true)showAdminShieldShow a shield on the tab row when running as administrator (default true)Look of the Window (global settings)
themedark (default), light, system or the name of a theme in themesshowTabsInTitlebarPut the tabs in the title bar (default true)alwaysShowTabsShow the tab row even with one tab (default true)tabWidthModeequal (default), compact, titleLengthtabSwitcherModeinOrder (default), mru, disabled: how Ctrl+Tab behavesuseAcrylicInTabRowFrosted-glass tab row (default false)disableAnimationsTurn off visual animations (default false)focusFollowMouseFocus the pane under the mouse (default false)snapToGridOnResizeResize the window in whole character steps (default false)autoHideWindowHide the window when it loses focus (default false)languageInterface language as a BCP-47 tag such as en-GB (default: the system's)Profiles: What Starts When You Open a Tab
profiles.listOne entry per shell; profiles.defaults holds settings applied to every profilename / guidThe label in the dropdown / its unique ID ({…})commandlineThe program to run, e.g. %SystemRoot%\System32\cmd.exestartingDirectoryFolder the shell starts in (default: the profile's own default)sourceMarks a profile generated automatically (such as WSL distributions or Azure Cloud Shell)hiddenHide a profile from the dropdown (default false)elevateAlways open this profile as administrator (default false)closeOnExitautomatic (default), graceful, always, nevertabTitle / suppressApplicationTitleFixed tab name; with suppressApplicationTitle on, programs cannot change ittabColor / iconColour of the tab / its iconenvironmentExtra environment variables, e.g. { "EDITOR": "vim" }pathTranslationStylenone (default), wsl, cygwin, msys2, mingw: convert paths when you drag a file inYour profilesWindows PowerShell, Command Prompt, Azure Cloud Shell, and the WSL distributions Ubuntu and Debian (found on this machine)Profile Appearance
colorSchemeName of a scheme from schemes (default Campbell)font{ "face": "Cascadia Mono", "size": 12, "weight": "normal" } (these are the defaults)font.features / font.axesOpenType features and variable-font axes, e.g. { "liga": 1 }font.cellWidth / font.cellHeightAdjust spacing between characters / linescursorShapebar (default), underscore, doubleUnderscore, filledBox, emptyBox, vintagecursorHeight / cursorColorHeight in percent for vintage (default 25) / cursor colouropacity / useAcrylicWindow transparency 0 to 100 (default 100) / frosted-glass effect (default false)paddingSpace around the text (default 8, 8, 8, 8)background / foregroundOverride the scheme's colours with #rrggbb valuesbackgroundImageA picture behind the text; with backgroundImageOpacity (default 1.0), backgroundImageStretchMode (default uniformToFill) and backgroundImageAlignment (default center)intenseTextStylebright (default), bold, all, noneadjustIndistinguishableColorsnever (default), indexed, always: make hard-to-read colour pairs readableantialiasingModegrayscale (default), cleartype, aliasedbellStyleaudible (default), or window, taskbar, all, noneunfocusedAppearanceA set of appearance settings used while the pane is not focusedActions & Key Bindings (settings.json)
"keybindings": [ … ]Each entry: { "id": "Terminal.CopyToClipboard", "keys": "ctrl+c" }; the id names an action"actions": [ … ]Define your own action: { "command": { "action": "sendInput", "input": "git status\r" }, "id": "User.gitStatus" }Key namesctrl, alt, shift, win joined by +, then a key such as t, f11, up, pgdn, periodRemove a default keyBind the key to the action unboundCommon actionsnewTab, splitPane, closePane, copy, paste, find, moveFocus, resizePane, switchToTab, renameTab, setTabColor, togglePaneZoom, toggleFocusMode, scrollToMark, setColorScheme, sendInput, wtsplitPane{ "action": "splitPane", "split": "auto", "splitMode": "duplicate", "size": 0.5 }newTab with a profile{ "action": "newTab", "profile": "Debian" }multipleActionsRun several actions with one keyThe wt Command Line
wtStart Windows Terminal from any shell; wt -h lists the helpwt -p "Debian"Open a profile by namewt -d C:\pathStart in a foldernew-tab (nt) split-pane (sp)Subcommands; options include -p profile, -d folder, --title, --tabColor, --colorSchemesp -H / sp -VSplit horizontally / vertically; -s .4 sets the new pane's share; -D duplicates the panefocus-tab -t 1Focus a tab by its number (starting from 0); also move-focus, move-pane, swap-panewt -w 0 ntNew tab in the most recently used window; -w -1 new window; -w name a named window-M -F -fStart maximised / full screen / in focus mode; also --pos x,y and --size c,r; (semicolon)Separates commands in one line. In PowerShell write `; (backtick, semicolon) or put --% after wtDev layout examplewt -p "Debian" ; sp -V -p "Windows PowerShell" ; nt -d C:\ --title Build (cmd syntax)Adding Your Own Shells (examples)
Git Bash profile (my knowledge){ "name": "Git Bash", "commandline": "C:\\Program Files\\Git\\bin\\bash.exe --login -i", "startingDirectory": "%USERPROFILE%" }WSL starting in your Linux home (my knowledge)"commandline": "wsl.exe -d Debian --cd ~"PowerShell 7 (my knowledge)Appears automatically as a profile once PowerShell 7 is installedHide profiles you never use"hidden": trueSame look everywherePut colorScheme and font in profiles.defaults instead of each profileA Reasonable Starter Set (my suggestions, not defaults)
"profiles": { "defaults": { "font": { "face": "Cascadia Code", "size": 12 } } }One font for every shell (Cascadia Code ships with Windows Terminal)"copyOnSelect": trueSelect to copy"historySize": 20000More scroll-back for long builds"newTabPosition": "afterCurrentTab"New tabs open beside the one you are in"warning.multiLinePaste": trueKeep the safety prompt when pasting several lines (the default)"defaultProfile": "Debian"If you live in WSL, make it the defaultEdited settings.json and nothing changed?
Windows Terminal reloads settings.json when you save it, so look for an error message at the top of the window. A missing comma, a stray quote or a wrong value stops the new settings being applied. Because the file starts with the $schema line, VS Code underlines such mistakes when you open it there. If you are really stuck, the graphical Settings page (Ctrl+,) writes valid JSON for you.
Ctrl+C: copy or interrupt?
In a terminal Ctrl+C normally means stop the running program. With Ctrl+C bound to copy, as in your settings, it copies only when text is selected and otherwise still sends the interrupt, so you can use it both ways. Ctrl+Shift+C always copies, whatever the selection. In WSL and other Linux shells the same Ctrl+C interrupt applies.