As a software engineer, I frequently have to use computer terminals/consoles, even though I’m not always thrilled about it! While I recognize that terminals are the fundamental interface for interacting with computing machines, I wonder if they have to be monotonous, especially in a GUI environment. For a long time of our computing experience it was indeed the case, a black and white, ultra boring terminal. But fortunately, thanks to the efforts of many talented developers, we now have improved terminals on all popular operating systems. For instance, Linux has Terminator, macOS got iTerm2, and Windows offers PowerShell. These terminals allow customization, making the overall experience less mundane. And to add to the excitement, there’s a cross-platform tool called Oh-My-Posh, which allows you to beautify your terminal even more!
In this post I will write down the steps to make your terminals from looking like this:
to something like this:
Step 1: Install necessary fonts
Go to the Nerd-fonts website, download and install one of the fonts you like. NB: If you are on Windows-11, make sure you install the fonts for all users (you will need admin rights) otherwise every time the PC restarts your W-11 will lose the font! I am sure it is a bug, but can also be a windows
feature!
Steps for Windows PowerShell
Step 2: Install Oh-My-Posh
winget install JanDeDobbeleer.OhMyPosh -s winget
NB: if you’ve previously installed oh-my-posh using the PowerShell module, you will need to uninstall it 1st
Uninstall-Module oh-my-posh -AllVersions
Step 3: Get your theme
Go to Oh-My-Posh theme page and download one of the <theme>.omp.json
files and put it in your user directory (enter %USERPROFILE%
in Run window). Let’s say you picked the jblab_2021
theme, then you will download this file: raw jblab_2021.omp.json
Step 4: Add the theme to PowerShell profile
Open PowerShell and enter either code $profile
or notepad $profile
to open the PowerShell profile, then add the following line at the end of the profile file:
oh-my-posh init pwsh --config ~/jblab_2021.omp.json | Invoke-Expression
Step final:
Close the already open PowerShell windows, then open it back. You should see the win :)
Share this on →