I have been using Conemu as my goto terminal, i.e. till Micrsoft released the beta version of Windows Terminal. Windows terminal has a tabbed window which allows you to have multiple consoles at the same time, allows for a lot of customizations.
I have also become an afficiando of Windows Subsystem for Linux (WSL) ever since it made its appearance on Windows 10. I already blogged about the latest font called “Cascadia Code” released by microsoft and how you can use it in Visual studio code and other IDEs, you can read it here. In this blog I will take you through to the steps to beautify your terminals.
Bash on WSL
“Oh My Zsh” is a wonderful tool which comes bundled with thousands of helpful functions, helpers and plugins.
- Open the windows terminal and open tab for your WSL.
- Run the following command.
sudo apt install zsh
- Verify is the Z-shell has been installed by running the following command, output should show the version of the ZSH installed
- Make Z-shell as the default shell so that each time you run bash it would load zsh
sudo chsh -s $(which zsh)
- Install Oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Now the bash terminal would look something like this
The configuration file would be stored in zshrc stored in the root directory, you could add themes and plugins as needed. I have uploaded my zshrc to this gist, if you are looking for an example.
Powershell or Powershell Core
Oh-My-Posh is windows version of Oh-My-zsh, it contains minimal but sufficient plugins and themes that would delight your experience with the terminal.
- Open Powershell in the terminal
- Install the following modules
Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser # This would be needed only if its Powershell Core Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
- Open the default profile using following command
- Add the following commands in the file opened in notepad
Import-Module posh-git Import-Module oh-my-posh Set-Theme Paradox
Close and re-open the tab and you should be noticing your powershell modified.
You could change the themes as you deemed fit by modifying your profile.
Glyphs and Nerd fonts
If you noticed the above image, the square boxes are because of the missing glyphs in the font used for the terminal. Cascadia code doesn’t have all the glyphs and the nerd fonts patched, you can patch it yourself using the Nerd fonts.
I have already patched Cascadia code and you can download it here
Once you have downloaded the font and installed it, update the terminal font to CascadiaCode Nerd Font, your prompt should start looking like this now