In this demo, I am going to show you how to pimp your terminal, whether you are a PC or Mac developer.
Are you a Windows PC developer and you are not using Windows Terminal, or you have not even heard of it? This demo is for you!
Are you a Mac Developer, and you are using the default zsh
terminal? this demo is for you!
By "pimp your terminal" I mean making your terminal look on Windows PC from this:
To this:
Or on macOS from this:
To this:
Not only the command prompt will be "Pimped" but also the results on a PC:
From this:
To this:
So, how do we do it? Let's get started!
In order to "Pimp your Terminal" on a Windows PC, you will need to forget about our dear "Command Prompt" and download the newest Windows Terminal from the Windows Store. Alternatively, you can download it directly from GitHub.com, from this link, as Windows Terminal is open source.
You also need to download and install PowerShell Core
from this link.
📘 The recommended way to install Windows Terminal is from the Windows Store, so you get automatic updates.
Windows Terminal is not a cross-platform application, and is not possible to pimp your default zsh
macOS Terminal, so in order to pimp our terminal in macOS, we need to install iTerm2
from this link, which is free.
The very first time I ever heard from someone talking about taking your terminal to the next level, a few years ago, was from the "third" Microsoft Scott, Scott Hanselman. I recommend you follow his blog here. The "first" being "Scott Guthrie", the creator of ASP.NET Web Forms
and blogging here, and the "second" Scott Hunter, Director Program Management, .NET, which you can also follow his blog here.
In order to "Pimp your Terminal" we are going to use a tool called "Oh My Posh", which works on any shell like PowerShell
on Windows, or Bash
shells on WSL (Windows Subsystem for Linux) running Ubuntu.
💡 You can find the official
Oh My Posh!
documentation here.
In order to install Oh My Posh on Windows you will need winget.
winget install oh-my-posh
winget upgrade oh-my-posh
POSH_THEMES_PATH
oh-my-posh --init --shell pwsh --config $env:POSH_THEMES_PATH/montys.omp.json | Invoke-Expression
Import-Module -Name Terminal-Icons
#Themes: jandedobbeleer, sonicboom_light, paradox, montys, mojada, gmay, cloud-native-azure, agnosterplus
In order to install Oh My Posh on Windows you will need brew.
brew install jandedobbeleer/oh-my-posh/oh-my-posh
brew update && brew upgrade oh-my-posh
# Enable theme
if [ $TERM_PROGRAM != "Apple_Terminal" ]; then
# Themes directory: $(brew --prefix oh-my-posh)/themes
# Change theme: montys.omp.json
eval "$(oh-my-posh init zsh --config /usr/local/opt/oh-my-posh/themes/atomic.omp.json)"
fi
brew install jandedobbeleer/oh-my-posh/oh-my-posh
brew update && brew upgrade oh-my-posh
As you can see, pimping your terminal and make it look awesome, is a very simple process thanks to "Oh My Posh", and it works on Windows, macOS and Linux. Give it a try!
For more information, take a look at the resources below.
The complete instructions for this demo can be found in the link below.
Resource Title | Url |
---|---|
Install and get started setting up Windows Terminal | https://docs.microsoft.com/en-us/windows/terminal/install |
iTerm2 | https://iterm2.com |
Oh My Posh | https://ohmyposh.dev/ |
Nerd Fonts | https://www.nerdfonts.com/ |
Scott Guthrie's Blog | https://azure.microsoft.com/en-us/blog/author/scott-guthrie/ |
Scott Hunter's Blog | https://devblogs.microsoft.com/dotnet/author/scott-h |
Scott Hanselman's Blog | https://www.hanselman.com/blog |
My Ultimate PowerShell prompt with Oh My Posh and the Windows Terminal | https://www.hanselman.com/blog/my-ultimate-powershell-prompt-with-oh-my-posh-and-the-windows-terminal |