Windows Terminal App – everything you need to know

The preview version of the new Windows Terminal app is now available. This new command-line app can be used for PowerShell, Cmd, SSH and WSL (Windows Subsystem for Linux). The great advantage of Windows Terminal is the support of multiple tabs, customization and the upcoming split-screen function.

As a SysAdmin, I have been looking out the (first) release of Window Terminal App. I use PowerShell and SSH a lot and have always multiple sessions open. So having everything in one place with tabs and even split-screen is really nice.

Windows Terminal

First, let’s start with some info about Windows Terminal itself before we get into the customization of it. Windows Terminal is set to be fully released at the end of 2019, but right now they released a preview version in the Windows Store. It’s still a bit buggy, but already great to play with.

The new terminal doesn’t only support multiple tabs and customization, it also supports Unicode, UTF-8 character, custom key-bindings and GPU accelerated text rendering engine

Windows Terminal Split-screen

One of the features I am mostly looking forward to, besides the tabs, is the support of split-screens. The feature isn’t released yet, but as you can read here on there GitHub page, they are currently working on it.

So split-screen is available now in Windows Terminal. It isn’t fully implemented yet, but what you can do is add the following key bindings to your profiles.json file:

,
			{
				"command" : "splitHorizontal",
				"keys" : ["ctrl+shift+right"]
			},
			{
				"command" : "splitVertical",
				"keys" : ["ctrl+shift+down"]
			},
			{
				"command" : "moveFocusUp",
				"keys" : ["ctrl+alt+up"]
			},
			{
				"command" : "moveFocusDown",
				"keys" : ["ctrl+alt+down"]
			},
			{
				"command" : "moveFocusLeft",
				"keys" : ["ctrl+alt+left"]
			},
			{
				"command" : "moveFocusRight",
				"keys" : ["ctrl+alt+right"]
			},
			{
				"command" : "resizePaneUp",
				"keys" : ["shift+alt+up"]
			},
			{
				"command" : "resizePaneDown",
				"keys" : ["shift+alt+down"]
			},
			{
				"command" : "resizePaneLeft",
				"keys" : ["shift+alt+left"]
			},
			{
				"command" : "resizePaneRight",
				"keys" : ["shift+alt+right"]
			},
			{
				"command" : "closePane",
				"keys" : ["ctrl+shift+w"]
			}

At the moment the Split Screen function only works in the current shell. So if you are in a PowerShell session you can’t open an SSH session next to it.

Installing

To install Windows Terminal you will need Windows 10 May 2019 update. You can download Windows terminal here in the Windows Store. Just follow the link and click on Install in your Windows Store. Updates and bugfixes will be released regularly and installed automatically.

Windows Terminal Profiles

One of the coolest features about Windows Terminal is that you can customize it with the help of profiles and color-schemes. You can create profiles for every app you use, so a custom color scheme for PowerShell and something else for cmd for example.

The profiles are now created in a JSON file, but in the final release you should be able to create custom profiles from the app itself. Now because it’s a preview release, the documentation isn’t complete yet.

Customizing your terminal

After you installed Windows Terminal you click on the dropdown menu and you got to settings. A JSON file will open in your default editor. The first part of the JSON file is about the keybinding, just scroll down until you get to the profiles section.

 {
            "acrylicOpacity" : 0.5,
            "closeOnExit" : true,
            "colorScheme" : "One Half Dark",
            "commandline" : "powershell.exe",
            "cursorColor" : "#00B4FF",
            "cursorShape" : "underscore",
            "fontFace" : "Consolas",
            "fontSize" : 10,
            "guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
            "name" : "PS",
            "padding" : "5,5,5,5",
            "snapOnInput" : true,
            "startingDirectory" : "%USERPROFILE%",
            "useAcrylic" : false
        },

Here above you see a profile section, in this case for PowerShell. The profiles for PowerShell and CMD are available by default. I customized mine a little bit, let me walk you through the most important settings

ColorScheme

"colorScheme" : "One Half Dark"

Below the profiles are the available color schemes defined. By default there 5 schemes available, here you can set the color scheme for the tool.

Cursor

"cursorColor" : "#00B4FF",
"cursorShape" : "underscore",

The color of the flashing cursor and the shape of it. For the shape you can choose between the following values: "vintage" ( ▃ ), "bar" ( ┃ ), "underscore" ( ▁ ), "filledBox" ( █ ), "emptyBox" ( ▯ )

Padding

"padding" : "5,5,5,5",

Be default the padding is set to 0,0,0,0. This way the content of the console is stuck to the edge of the window. By setting it to 5,5,5,5 you will create some space between it.

Transparency

"acrylicOpacity" : 0.5, 
"useAcrylic" : false

With the option useAcrylic on true and the opacity set, you can have a transparent/blurred background. This option can’t be combined with a custom background (yet).

The result of this profile looks like this:

Windows 10 Terminal PowerShell Profile.

I don’t have any background, just a different cursor color between the apps I am using.

Adding a background to Windows Terminal

You can also add a background to each profile, this can be an image or a gif (so yes you can have an animated background). To add a background to Windows terminal you will need to add the following lines in your profile:

"backgroundImage" : "C:/Users/lazyadmin.nl/AppData/Roaming/consoleBackground.png",
"backgroundImageOpacity": 1.0,
"backgroundImageStretchMode": "fill",

Windows Terminal Background

For backgrounds to work you will have to set useAcrylic to false.

Adding SSH tab

You can add profiles for other CLI apps that you want to use, for example, Windows Subsystem for Linux or simple SSH. I have added a couple of SSH profiles that directly connect to some of the Linux servers I regularly use.

Add a new profile after the last one in the list of profiles (make sure you add a comma to the last profile before you add another to it)

{
            "acrylicOpacity" : 0.5,
            "closeOnExit" : true,
            "colorScheme" : "One Half Dark",
            "commandline" : "ssh lazyadmin@80.81.82.83 -p 22",
            "cursorColor" : "#F1F441",
            "cursorShape" : "underscore",
            "fontFace" : "Consolas",
            "fontSize" : 10,
            "guid" : "{d3b9fdb4-9b8f-4735-97fe-1aed5e648701}",
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.scale-100.png",
            "name" : "VPS02",
            "padding" : "5,5,5,5",
            "snapOnInput" : true,
            "startingDirectory" : "%USERPROFILE%",
            "useAcrylic" : true
        }

The command-line and GUID are the most important lines. We can set up a ssh connection with the cmd ssh <username>@<ipaddres> -p <portnumber>. This way you only have to enter the password when you open the connection.

The GUID must be unique for every profile. Now you can change some random characters or generate a GUID with the following PowerShell cmd:

[guid]::newguid()

There are some default icons available in Windows Terminal, but those aren’t documented yet. You can add a custom one or use one of the icons in the list.

After you added your profiles you can find them in the dropdown list:

Custom profiles SSH

Conclusion

Even though it’s an (early) preview version of Windows Terminal I already like the look of it. There are coming to some nice features to it which will make this the most used terminal for sure on Windows (at least for me 😉 ).

If you are looking for more then a terminal alone, then check this article about the best remote connection manager tool that I like to use.

3 thoughts on “Windows Terminal App – everything you need to know”

  1. Sadly you cannot configure a PowerShell terminal to run elevate (aka Admin). Doing some research there is a Github issue on this and this is by design.

    • True, but you can start Windows Terminal self in elevated mode. This way PowerShell will run in elevate mode aswell. You can check it with the following command in PowerShell:

      $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
      $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)

  2. Thanks very much for this quick tutorial. I agree that this will quickly become the most widely used terminal for Windows.

Leave a Comment

0 Shares
Tweet
Pin
Share
Share