Windows Terminal: Everything you need to know now

Microsoft's new Terminal for command-line applications is now available. So how do you get the most from it?

Microsoft Build 2020: All developers need to know

Microsoft open-sourced its Terminal client at its 2019 Build event. I sat in a hotel room in Seattle, with a copy of Visual Studio compiling up the first release ready to see what a modern Windows terminal would be like. After all, the old terminal client and the whole Windows command-line tooling was showing its age, compared to other widely available tools. Not only that, but with the increasing popularity of Windows Subsystem for Linux (WSL) and a new focus on Windows as a developer platform, an improved terminal was now essential.

SEE: Windows 10 Start menu hacks (TechRepublic Premium)

A year later, and Windows Terminal has moved out of beta into general release. It's a complete re-architecture of the Windows command-line experience, with all the features you'd expect from a modern terminal client, optimised for PowerShell and for WSL. Unlike the original Windows command line, it's customisable and designed to take advantage of the modern PC graphics hardware with transparency and background images. Fancy a terminal that looks like your Ubuntu desktop for WSL, or one that's a classic green or amber screen, or your choice of animated background? They're options, even the glowing CRT effects of the VT220 green-screen terminals, complete with slightly fuzzy text and video scan lines.

Getting started with Windows Terminal

The new Windows Terminal is a tabbed terminal, with each tab associated with a different profile. Tabs are auto-populated with each update, and support PowerShell, the classic Windows command line, Linux WSL installs (both WSL 1 and WSL 2), and the Azure Cloud Shell command line. Profiles are customisable, using a JSON settings file that can be edited in your favorite text editor, like Visual Studio Code. Settings can include background images, which can even be animated GIFs.

Getting started is easy enough: download and install the release code from the Microsoft Store or from GitHub. Using the Store is the best option, as this will automatically update with new releases and bug fixes. Once installed it will automatically configure itself for known command-line applications with PowerShell as the default. New tabs can be opened by clicking the '+' on the tab menu, opening a new tab using the current active profile. Other profiles are available on a drop-down menu.

microsoft-terminal-panes.jpg

Windows Terminal is available from the Microsoft Store and GitHub. There's a range of look and feel on offer in the tabbed terminal, which also supports panes.

Image: Microsoft

Using Panes in windows

A quick way of getting a second instance of your current shell is to open a pane. Hit Alt+Shift + to open a new pane of your default profile to the right of your current pane. Alt+Shift – opens a horizontal pane below your current one. You can choose your own key settings for panes in Terminal's settings file, with the option of including an automatic placement to take advantage of available window space.

To switch between panes, use Alt and the arrow keys, with Alt+Shift and the arrow keys to resize the panes. Ctrl+Shift w closes the current pane (if there are no panes, then it closes the Terminal window). Adding your own keys allows you to change the action from opening your default profile to duplicating the active pane -- an approach you might find preferable to the default.

Editing your settings

It's worth spending time working with the settings file, which automatically opens in your default editor when you select Settings in Terminal's drop-down menu. There's a lot in here, so familiarise yourself with the Terminal documentation. The settings file splits into two main sections: global settings for all profiles, and specific settings for each profile.

In the global settings, at the top of the JSON-formatted settings, you can choose your default profile to open at launch using the GUID of your chosen profile. Terminal will set a GUID for each profile it discovers, so copy and paste your choice of command lines. The default is PowerShell, but you might prefer a different PowerShell version, or even a WSL install. Other global settings control the tab bar, copy and paste options, and the size (in rows and columns) and position of the Terminal window at launch.

Windows Terminal's profile settings let you tune how it behaves for each of your installed command lines. They're split into two sections, a default that affects all profiles, and a list of individual profiles. For example, you can use the default to set font sizes and a standard colour scheme. Individual profiles let you fine-tune the options for each of your installed shells, with starting directories and the name displayed in the dropdown.

microsoft-terminal-settings.jpg

The settings file automatically opens in your default editor when you select Settings in Terminal's drop-down menu.

Image: TechRepublic

Choosing fonts and colors

Other options allow you to fine tune the look and feel of a terminal session, setting fonts, tab titles, even the shape and colour of the cursor. Colors can be set by choosing a colour scheme by name, or by picking and choosing the individual values for fonts. You can even pick a transparency setting for terminal windows, as Terminal uses Windows' Fluent design language with support for its Acrylic effects.

Colour schemes can be edited by holding down ALT when you click the Settings option in the drop down, and are defined using hex color codes. Microsoft actually includes more than the default Campbell scheme with Terminal, and its worth exploring the different options and using them as a jumping off point for your own schemes.

Using the command line from the command line

You don't have to launch the Terminal from the Start menu or the Windows task bar: there are plenty of command-line options. These let you pick and choose the profile to launch, the directory to open, and even the tabs and split panes to use.

With the Windows Terminal what you see is only a window into the terminal text buffer. While you can scroll through it, it's often easier to search for specific keywords using the built-in search. This adds a search box to your terminal window, searching up or down the text buffer. Searches can be focused on an entire window or on a single pane.

Cascadia Code: a new font for terminals and editors

At the same time as developing a new terminal, Microsoft has been developing a new monospaced font for both the Windows Terminal and Visual Studio Code. Cascadia Code has been designed to support modern terminal features, including ligatures and glyphs. Its clear and easy to read, and ships with the Windows Store release of terminal. It's also available from GitHub, so you can keep up to date with the latest releases.

One of the more interesting features for Terminal users is a version of Cascadia Code with support for the glyphs used in the popular terminal plugin Powerline (available for Linux and for PowerShell). You need to explicitly add Cascadia Code Mono PL to your Terminal settings if you want to use Powerline features to add information to your command-line prompt. If you want your Terminal to display programming ligatures (for example, replacing -> with an arrow), use the standard version of the font.

Editing the Terminal settings file lets you set different fonts for each terminal used, so if you want to stick with the classic Windows Terminal font for cmd, then you can add it to the appropriate settings section. Alternatively, you can set a single font for all your terminals, by adding a font definition to your default settings.

There's a lot in this new Terminal, and more to come. Microsoft has promised to update it monthly, through both the Windows Store and GitHub, starting in July 2020. If you prefer to experiment with the latest code, a Preview version is available from both services, with monthly updates from June 2020. And of course, Windows Terminal is now open-source, so you can make suggestions for features you want to see and even contribute your own code.

Also see