How to Customize the Microsoft Terminal

Last Update: Nov 19, 2024 | Published: Jul 14, 2020

SHARE ARTICLE

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?

  • Multiple Tabs
  • Split Panes
  • Transparency
  • Full Unicode Support
  • Background Image Support
  • Color Schemes

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

Getting Microsoft Terminal

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.

Configuration Options

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.

Image #1 Expand
Untitled

Once the settings.json file has been opened, there are four sections to be aware of:

  1. Global Settings
  2. Profile Settings
  3. Color Schemes
  4. Key Bindings

Below we will explore each section and how they can be customized.

Global Settings

These settings apply to the entire Microsoft Terminal and any profile that is being run. The available types of commands are:

  • Default Profile – The default profile to load upon Microsoft Terminal startup.
  • Disable Dynamic Profiles – By default, Microsoft Terminal will automatically create profiles for use that match installed features on your system and this setting when disabled would mean that these profiles are not automatically created. This is useful if you want to specifically define the profiles to show.
  • Dark/Light Theme – Whether to show the dark or light window theme for Microsoft Terminal.
  • Tab Settings – There are a number of options, such as, Always Show Tabs, Tab Width Mode, or Hide Close All Tabs Popup.
  • Launch Settings – Again, there are a number of settings here as well, such as, Launch Size, Launch Position, Columns on First Launch, and Rows on First Launch.
  • Title Bar Settings – Only two settings are here which are, Show/Hide the Title Bar and Set the Title Bar Text.
  • Selection Settings – A handful of settings such as Copy after selection is made, Copy Formatting, and Word Delimiters make it easy to make selection work efficiently.
  • Scroll Speed – The only setting here is rowsToScroll which is the number of rows to scroll at one time with the mouse scrollwheel.
  • Window Resize BehaviorsnapToGridOnResize will define whether resizing the terminal snaps to the nearest character or if set to false will smoothly resize.
  • Rendering Settings – Whether Screen Redrawing or Software Rendering are set.

Profile Settings

Arguably the most important section, the profile settings define how an individual terminal session in the terminal host application behaves and functions.

  • Executable – What the actual executable to run for the profile. Settings here are the Command Line and Starting Directory.
  • Dropdown – The items that are displayed in the dropdown menu. This would be the Name, Icon, and whether to Hide a Profile from the Dropdown.
  • Tab Title – You are able to set a Custom Tab Title and/or Suppress Title Changes from the Shell, which is convenient when your profile tries to overwrite the title depending on the application used.
  • Text – What Font and Font Size to use in the terminal profile. Also, the amount of Padding and whether to Antialias the text.
  • Cursor – Set the Cursor Shape (such as Bar, Vintage, or Underscore), the Cursor Color, and the Cursor Height.
  • Color – What Color Scheme to use, the Foreground and Background Color, and what the Selection Background Color is.
  • Acrylic – Whether to use the Acrylic setting and it’s Opacity (transparency).
  • Background Image – Set a background image, it’s stretch mode, alignment and opacity.
  • Scroll – Set whether the scrollbar is visible, scroll to input line when typing, and the history size.

Color Schemes

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"
	},
]

Key Bindings

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" }
]

Sample Profile

Sometimes it is easiest to see everything pulled together in an example. For the following profile, we are going to:

  • Define a default and single PowerShell 7 profile
  • Set the global theme to Dark
  • Configure a custom color scheme, Chester
  • Use default keybindings
  • Disable Dynamic Profiles
{
  "$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": []
}

Conclusion

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.

SHARE ARTICLE