I enjoy tinkering with decorative things and found the default Windows terminal really ugly. I planned to use Oh My Posh to beautify it. This tutorial is based on the Terminal that comes with Windows 11.

Font

I use the CodeNewRoman Nerd Font, which is also the font used for my blog. You can download it from here. After downloading, simply install it. You can also use this font in VS Code.

Install oh-my-posh

winget install JanDeDobbeleer.OhMyPosh

Terminal Settings

I directly modified the configuration of Windows PowerShell. If you don’t want to affect the default configuration, you can also create a new configuration file.

Under the Color scheme option, I chose Campbell, but I changed the background of the first theme in the settings JSON file to #0C0C0C to avoid a pure black background.

Under the General tab of Windows PowerShell, uncheck “Use parent process directory”. Under the Appearance tab, select the downloaded font CodeNewRoman Nerd Font.

File Configuration

In the terminal, enter:

echo $profile

Find this file, and if you can’t find it, create a new one.

Choose a theme you like from here, click the theme name to go to the corresponding GitHub page, and download the .json source code. Save it locally and paste the following statement into your profile file, modifying the path to where you saved it.

oh-my-posh init pwsh --config 'C:/Users/Posh/jandedobbeleer.omp.json' | Invoke-Expression

After saving, run:

. $profile

FAQ

If the execution fails, you may need to update PSReadLine.

If icons are not recognized, it’s likely a font issue. Check if you’ve set the font in the PowerShell window to a Nerd font.

Preview

Bash

MacOS & Linux

For MacOS and Linux, it’s also highly recommended to use zsh, especially for Linux, since MacOS should have already set zsh as the default shell. The advantage of zsh is that it provides auto-completion and looks much better than bash.

After installing zsh, you can continue to install oh-my-zsh to manage themes and other plugins.