Enhance your terminal experience on Windows
Tags: productivity, programming, tutorial, powershell
Published: 2022-03-06 09:56:37

Are you still using the Command Prompt on your Windows machine? It really feels like the relic of the past and is a tool ripe for improvement. Many modern features that we have come to expect from a command-line app aren't available. No tabs, no syntax highlighting, and quite outdated:

![Old Command Prompt application for Windows](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lslkcn7xk5lsz1wo0mxy.png)

Luckily, Microsoft has invested its efforts into building the next-generation terminal app, called [Windows Terminal](https://github.com/microsoft/terminal). This new app supports long-awaited features like multi-tabs, emoji, theming, and many other tweaks that developers will love to use. This and many other tools will allow us to upgrade our terminal experience to look like this: 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3z5rzertnx241kmvnz92.png)

Tools that we will be using to create this terminal experience are:
- Windows Terminal
- Windows package manager: winget
- Nerd Font
- PowerShell
- Oh-my-posh

This will be a very straightforward guide to upgrading your terminal experience with pure Windows tools. So let's get started! 

# 1. Install Windows Terminal
The new command-line application Windows Terminal might already be installed on your Windows machine. If this is not the case, the easiest way to get it is by [installing Windows Terminal from the Microsoft Store](https://aka.ms/terminal). This method makes it possible to always get the latest releases automatically for your Windows Terminal.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9jljgqffx87a6cdndr4.png)
 
# 2. Install Winget
To make installing all the tools as easy as possible, we will be using the built-in Windows Package Manager called **winget**. This is a command-line tool bundled with Windows 11. You can check in the Microsoft Store whether you already have this installed. This package manager is called App Installer in the Microsoft Store.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrmkuwdmt4dxdwx86efs.png)


# 3. Install PowerShell
PowerShell is a command-line shell and scripting language developed by Microsoft. There is a bit of confusion with two variants that exist for PowerShell: **Windows PowerShell** and **PowerShell Core**. **PowerShell Core** is the name used for PowerShell starting for version 7.0. All versions before version 7.0 are denoted by **Windows PowerShell**. The main difference between these two is that **PowerShell Core** is the new open-source version built on the .NET Core runtime which opens the door for cross-system compatibility. Using the .NET Core runtime also enables backwards compatibility with previous versions of PowerShell. We will be using PowerShell Core (a.k.a V7) to upgrade our Windows Terminal experience.

**PowerShell Core** can be downloaded from the [PowerShell GitHub repository](). If you're running a 64-bit Windows machine, use the LTS .msi installer for **Windows (x64)**. For 32-bit use the x86 installer. When you go through the installer of **PowerShell Core**, the default pre-selected options are fine.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12zbb79hp4nxu8ahvwy1.png)

# 4. Setup PowerShell as default shell in Windows Terminal
 
When you start up Windows Terminal, Windows PowerShell will still start up as the default shell as opposed to the more modern PowerShell Core that you just installed. Inside Windows Terminal, the more modern PowerShell Core is just called PowerShell. Changing the default shell can be done very easily in Windows Terminal.

Click on the downward-facing arrow at the top and then select Settings.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojz6sd6a2mgvwt1ugln8.png)

A Settings tab will open and show you the Startup configuration as follows:

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yuplw4lei2vbafu98zy1.png)

Click on the drop down-window for the Default profile and select PowerShell.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1nmgbc5vykiq4i1ciw5n.png)

Click Save afterward and Windows Terminal will always start up PowerShell as the default shell.

## Optional step for Windows 11 users  
 
If you’re using Windows 11, you can set up Windows Terminal as the default command-line tool when you start up PowerShell or Command Prompt separately. This ensures that you are always using Windows Terminal as the default terminal emulator. You can do this from the Settings from your Windows Terminal by selecting Windows Terminal as the Default terminal application:

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2w9sxr6rahcx8tirxahe.png)

# 5 Install a Nerd Font

We will be using a theming engine that requires lots of special glyphs. The nerd font that we will be using is **Meslo LGM NF**. This font can be downloaded from this [link](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Meslo.zip). There are also other Nerd Fonts that you can choose from by visiting the [Nerd Fonts GitHub Page](https://github.com/ryanoasis/nerd-fonts).

After installing your Nerd Font, you need to set this as the default font in Windows Terminal. Go to the settings page of Windows Terminal and click on the PowerShell profile in the bottom left.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9gvtmv1be1mv4p4nrn1z.png)

Afterward, click on the Appearance tab and select MesloGL NF as the Font face. Make sure to click Save at the end.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/by4quo46yxm3wretbr2x.png)

Now you’re all set to start the next step, where the real fun begins!

# 6. Oh My Posh
What will bring your terminal experience to life and enhance your terminal journey when you’re using the command-line tools is a theming engine. We will use [Oh My Posh](https://ohmyposh.dev/) to achieve this result.

To install Oh My Posh, run the following command in Windows Terminal
```powershell
winget install JanDeDobbeleer.OhMyPosh
```

Now your existing prompt needs to be replaced by Oh My Posh inside the PowerShell profile. This profile can be accessed with the `$PROFILE` variable. The catch is that this variable points to a file that doesn’t exist yet. Make sure that the following empty file exists on your machine and replace `USER` with your Windows user.
```powershell
C:\Users\USER\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
```
 
After the empty PowerShell profile has been created, type the following in Windows Terminal:
```powershell
notepad $PROFILE
```

Add the following line in Notepad and then save it:
```powershell
oh-my-posh --init --shell pwsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json | Invoke-Expression
```

Close your Windows Terminal and reopen it again and you will be greeted with some awesomeness!

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ou1i7n1eyyempnt55c2.png)
 
# Conclusion
If you’re using the Windows Terminal on a daily basis for your job, it will be definitely worth it to do these upgrades. From my experience, it’s quite painless to configure the different parts of a Windows machine to our liking in 2022. A terminal that is a feast to our eyes, makes our job more enjoyable to do. Small changes like these can give us a big productivity boost.

If the content was helpful, feel free to support me [here](https://www.buymeacoffee.com/duncanlew):
<a href="https://www.buymeacoffee.com/duncanlew" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>