Last Update: Nov 19, 2024 | Published: Jul 14, 2020
Microsoft recently released a brand new terminal application aptly named Microsoft Terminal. Written from the ground-up, this modern terminal boasts a large number of features intended to appeal to system administrators of both Windows and Linux systems alike. What are some of the features?
With an emphasis on heavy customization and ease of use, the new Microsoft Terminal makes it easy to connect and administrator local systems, remote systems, and even WSL (Windows Subsystem for Linux).
The easiest way to install Microsoft Terminal is through the Microsoft Store, which also will automatically download the latest releases as well. The source repository also has each new release available as an .msixbundle
.
If you are installing Microsoft Terminal manually, then make sure to install the Desktop Bridge VC++ v14 Redistributable Package. This is not necessary if using the Microsoft Store method of installation.
There are many ways to configure Microsoft Terminal to fit your needs. Each release has refined or expanded upon the available customization options. Microsoft Terminal uses a settings.json
file encoded, as expected, in the JSON format. The default location is:
C:\Users\{User}\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
The easiest way to modify this file is to open Microsoft Terminal and choose Settings.
Once the settings.json
file has been opened, there are four sections to be aware of:
Below we will explore each section and how they can be customized.
These settings apply to the entire Microsoft Terminal and any profile that is being run. The available types of commands are:
rowsToScroll
which is the number of rows to scroll at one time with the mouse scrollwheel.snapToGridOnResize
will define whether resizing the terminal snaps to the nearest character or if set to false
will smoothly resize.Arguably the most important section, the profile settings define how an individual terminal session in the terminal host application behaves and functions.
There are a number of built-in color schemes that can be used on any profile and those are, Campbell, Campbell PowerShell, Vintage, One Half Dark, One Half Light, Solarized Dark, Solarized Light, Tango Dark, and Tango Light. To use one of the included schemes you would simply
"profiles":
[
{
"name": "My Custom Profile",
...
"colorScheme": "Tango Dark",
...
}
]
You may want to create your own color schemes and to do so, you would name a scheme, define the colors, and then use that in the colorScheme
setting from the target profile.
"schemes": [
{
"name" : "My Custom Scheme",
# cursorColor and selectionBackground are optional
"cursorColor": "#FFFFFF",
"selectionBackground": "#FFFFFF",
"background" : "#0C0C0C",
"foreground" : "#CCCCCC",
"black" : "#0C0C0C",
"blue" : "#0037DA",
"cyan" : "#3A96DD",
"green" : "#13A10E",
"purple" : "#881798",
"red" : "#C50F1F",
"white" : "#CCCCCC",
"yellow" : "#C19C00",
"brightBlack" : "#767676",
"brightBlue" : "#3B78FF",
"brightCyan" : "#61D6D6",
"brightGreen" : "#16C60C",
"brightPurple" : "#B4009E",
"brightRed" : "#E74856",
"brightWhite" : "#F2F2F2",
"brightYellow" : "#F9F1A5"
},
]
There are many different ways to customize the key bindings. The format that is expected is as shown below.
# Commands without arguments
{ "command": "commandName", "keys": "modifiers+key" }
# Commands with arguments
{ "command": { "action": "commandName", "argument": "value" }, "keys": "modifiers+key" }
Some examples of this would be contained in the keybindings
global configuration list.
"keybindings": [
{ "command": "closeWindow", "keys": "alt+f4" },
{ "command": { "action": "newTab", "index": 0 }, "keys": "ctrl+shift+1" }
]
Sometimes it is easiest to see everything pulled together in an example. For the following profile, we are going to:
Chester
{
"$schema": "<https://aka.ms/terminal-profiles-schema>",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"disabledProfileSources": ["Windows.Terminal.Wsl", "Windows.Terminal.Azure", "Windows.Terminal.PowershellCore"]
"requestedTheme": "dark",
"snapToGridOnResize":true,
"profiles":
[
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"commandline": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"startingDirectory": "%USERPROFILE%",
"closeOnExit": true,
"colorScheme": "Chester",
"cursorColor": "#FFFFFF",
"cursorShape": "bar",
"fontFace": "Cascadia Code PL",
"fontSize": 12,
"historySize": 9001,
"icon": "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
"padding": "8, 8, 8, 8",
"snapOnInput": true,
"useAcrylic": true,
"acrylicOpacity": 0.8,
"antialiasingMode":"cleartype"
},
],
// Add custom color schemes to this array
"schemes": [
{
"name": "Chester",
"black": "#080200",
"red": "#fa5e5b",
"green": "#16c98d",
"yellow": "#ffc83f",
"blue": "#288ad6",
"purple": "#d34590",
"cyan": "#28ddde",
"white": "#e7e7e7",
"brightBlack": "#6f6b68",
"brightRed": "#fa5e5b",
"brightGreen": "#16c98d",
"brightYellow": "#feef6d",
"brightBlue": "#278ad6",
"brightPurple": "#d34590",
"brightCyan": "#27dede",
"brightWhite": "#ffffff",
"background": "#2c3643",
"foreground": "#ffffff"
}
],
// Add any keybinding overrides to this array.
// To unbind a default keybinding, set the command to "unbound"
"keybindings": []
}
As you can tell, Microsoft Terminal is a highly customizable and powerful terminal application. Constantly updated and refined, the future is bright. Some of the upcoming features, at time of this article, right-click to open in the terminal from Explorer, Launch Terminal on Windows Startup, Font Weight Support (such as bold text within the terminal), Renaming of Tab Titles, Custom Tab Colors, Alt-Click to Open Pane, and Compact Tab Sizing.