GET-IT: TEAMS DAY | 1-Day Free Virtual Conference all about Teams. Here on Petri.com - 8/12/20 GET-IT: TEAMS DAY - 8/12/20

How to Customize the Microsoft Terminal

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:


The easiest way to modify this file is to open Microsoft Terminal and choose Settings.

Image #1 Expand

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


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.

Key Bindings

There are many different ways to customize the key bindings. The format that is expected is as shown below.


Some examples of this would be contained in the keybindings global configuration list.

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

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.

Related Topics:

  • PowerShell
  • BECOME A PETRI MEMBER:

    Don't have a login but want to join the conversation? Sign up for a Petri Account

    Register
    Entrepreneur, hustler, husband, dad, Automator, content producer, published author, Microsoft MVP, DevOps pro and passionate problem-solver.