Use the New Windows Terminal
Tags: wsl, powershell, development, programming
Published: 2020-09-05 11:19:32

Once upon a time, the Windows command line was CMD, and it was horrible. No longer.

The Powershell window is much better, but still not comparable to the various terminal window options on Linux and Mac.

> Be that as it may, you probably want to make it easier to access Powershell rather than CMD with the `⊞-x` keyboard shortcut, so:

> ![Replace Command Prompt with Windows PowerShell in the menu when I right-click the Start button or press Windows key+X](https://dev-to-uploads.s3.amazonaws.com/i/2gwlgwylit2yhd6vhobp.png)

> Open the Start Menu, type "Replace Command Prompt," and you should see the above setting. 

Thankfully, we can do so much better than the Powershell window.

Enter the relatively new [Windows Terminal](https://github.com/microsoft/terminal). Made by Microsoft, and released under the open source MIT license.

## Multiple Tabs, Multiple Shells, User Configuration

There are many welcome features in the Windows Terminal. The ones I most appreciate:

- Multiple tabs: `Ctrl-Shift-t` will open a new tab. `Ctrl-Shift-w` will close it.
- Choose your "profile": you can have Powershell in one tab, Windows Subsystem for Linux (WSL) in another, CMD in another, an [alternate WSL distro](https://dev.to/bowmanjd/install-fedora-on-windows-subsystem-for-linux-wsl-4b26) in another... Options.
- Configuration with a JSON file. `Ctrl-,` will open the settings file in your default text editor. See [the settings docs](https://aka.ms/terminal-profile-settings) for details on what you can configure (yes, font face is one of them; hello, [Fira Code](https://github.com/tonsky/FiraCode)! Hello, [Nerd Fonts](https://www.nerdfonts.com/)!)

See [the official docs](https://docs.microsoft.com/en-us/windows/terminal/) for more details.

## Installing Windows Terminal

There are many ways to install Windows Terminal. Any of the following will work well, but I have listed them in my order of preference.

> First, though, make sure your Windows 10 version is recent enough. Run `winver` (in Powershell, CMD, or after `⊞-r`). Windows Terminal requires at least Windows 10 1903 (build 18362). So, if you are on version 2004, for instance, you are fine.

### Install from the Microsoft Store

For an easy-to-get, auto-updating version, [install from the Microsoft Store](https://aka.ms/terminal)

[aka.ms/terminal](https://aka.ms/terminal)

Done and worry-free.

### Use Chocolatey or Scoop

Command line package managers on Windows? [Yes, please](https://dev.to/bowmanjd/chocolatey-vs-scoop-package-managers-for-windows-2kik).

If you use Chocolatey:

```console
choco install microsoft-windows-terminal
```

If you would prefer to install with Scoop, make sure you have enabled the extras bucket, then:

```console
scoop install windows-terminal
```

Feel free to read [my introduction to Chocolatey and Scoop](https://dev.to/bowmanjd/chocolatey-vs-scoop-package-managers-for-windows-2kik) for further comparison and usage details.

### Download an installer

If you really abhor auto-updating, or are a traditionalist and proud of it, you can download an installation bundle from [Microsoft's releases page on Github](https://github.com/microsoft/terminal/releases).

You will then be responsible for updating it yourself, so you might want to subscribe to that repo on Github:

![Select Watch and Releases Only at github.com/microsoft/terminal](https://dev-to-uploads.s3.amazonaws.com/i/4o3wg0eq22u1xk02yfs6.png)

## Alternatives

While I believe Windows Terminal is now the best option on Windows, if it is not to your liking, you may want to explore these possibilities:
- [ConEMU](https://conemu.github.io/)
- [cmder](https://cmder.net/)
- [The terminal in VSCode](https://code.visualstudio.com/docs/editor/integrated-terminal)

Whatever you use, make the command line your friend, and you will live happily.