How to Transform Your WSL Terminal with Oh My Posh, Nerd Fonts, and Custom Themes
This guide explains why a polished WSL terminal improves productivity, then walks through installing a Nerd Font, setting up Oh My Posh, selecting and customizing themes, configuring Windows Terminal color schemes, adding colored ls aliases, and using handy shortcut keys—all with concrete commands and examples.
Why beautify the terminal?
A visually appealing terminal not only looks good but also surfaces useful information at a glance, such as the current Python version, Git branch, uncommitted changes, background jobs, and command execution time, allowing developers to monitor project status without extra commands.
Step 1 – Install a Nerd Font
Terminal icons and symbols require a Nerd Font; otherwise they appear as garbled blocks.
1. Visit https://www.nerdfonts.com/
2. Click "Download Fonts"
3. Choose one of the following (either is sufficient):
• JetBrains Mono – monospaced coding font (recommended)
• CascadiaCode – Microsoft’s default VS Code font
4. After downloading, extract the archive, right‑click the .ttf file and select "Install for all users"
5. Restart Windows TerminalAlternatively, install via winget:
# Install JetBrains Mono Nerd Font
winget install Dev86.JetBrainsMonoNerdFont -s winget
# Or
winget install DEVCOM.JetBrainsMonoNerdFontVerify the installation by opening Windows Terminal and confirming that icons such as render correctly.
Step 2 – Install Oh My Posh (prompt engine)
# Download the latest binary
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
chmod +x /usr/local/bin/oh-my-posh
# Verify installation
oh-my-posh --versionAdd the initialization line to ~/.bashrc and reload:
echo 'eval "$(oh-my-posh init bash)"' >> ~/.bashrc
source ~/.bashrcThe prompt should now change.
Available themes
List built‑in themes:
oh-my-posh get themes # shows 100+ theme namesPreview a single theme:
oh-my-posh init bash --config $(oh-my-posh config get atomic)Or browse interactively at https://ohmyposh.dev/docs/themes.
Recommended themes
atomic – clean, modern, double‑line; ideal for full‑stack developers.
jandedobbeleer – classic double‑line, information‑rich; great for everyday use.
paradox – sleek single‑line with a premium feel; suited for users who prioritize aesthetics.
robbyrussell – Oh‑My‑Zsh‑style classic; familiar to Zsh users.
night-owl – eye‑friendly dark theme; good for long coding sessions.
Setting a theme
Example using the atomic theme:
echo 'eval "$(oh-my-posh init bash --config $(oh-my-posh config get atomic))"' >> ~/.bashrc
source ~/.bashrcCreating a custom theme (advanced)
Place a JSON file in ~/.poshthemes and reference it from the init command. Below is a minimal example:
mkdir -p ~/.poshthemes
cat > ~/.poshthemes/my-theme.omp.json <<'THEME'
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{"type": "os", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#ffffff", "background": "#0077c2", "template": " {{.Icon}} "},
{"type": "path", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#e5c07b", "background": "#313644", "properties": {"style": "full", "home_icon": "~"}, "template": " \uF071 {{ .Path }}"},
{"type": "git", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#98c379", "background": "#313644", "template": " {{ .HEAD }}{{ if or (.Working.Changed .Staged.Changed) }} \uF044 {{ .Working.String }}{{ end }}{{ if gt .Behind 1 }} \uF044 {{ .Behind }}{{ end }}{{ if gt .Ahead 1 }} \uF044 {{ .Ahead }}{{ end }} "}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{"type": "python", "style": "plain", "foreground": "#61afef", "template": "{{ .Full }} ", "properties": {"display_version": true}},
{"type": "executiontime", "style": "plain", "foreground": "#c678dd", "template": "{{ .FormattedMs }}ms ", "properties": {"threshold": 500, "style": "roundrock"}}
]
}
],
"version": 2
}
THEME
# Activate the custom theme
echo 'eval "$(oh-my-posh init bash --config ~/.poshthemes/my-theme.omp.json)"' >> ~/.bashrc
source ~/.bashrcWindows Terminal color scheme
Open settings.json (Ctrl+,) and add the following configuration:
{
"profiles": {
"defaults": {
"font": {"face": "JetBrainsMono Nerd Font", "size": 13, "ligatures": true},
"colorScheme": "One Half Dark",
"cursorShape": "filledBox",
"cursorHeight": 25,
"padding": "10, 8, 10, 8",
"useAcrylic": true,
"acrylicOpacity": 0.92,
"scrollbarState": "visible",
"experimental.rainbowRendering": true
}
},
"schemes": [
{
"name": "One Half Dark",
"background": "#282c34",
"foreground": "#abb2bf",
"black": "#282c34",
"blue": "#61afef",
"cyan": "#56b6c2",
"green": "#98c379",
"orange": "#d19a66",
"purple": "#c678dd",
"red": "#e06c75",
"white": "#abb2bf",
"yellow": "#e5c07b"
},
{
"name": "Tokyo Night",
"background": "#1a1b26",
"foreground": "#a9b1d6",
"black": "#32344a",
"blue": "#7aa2f7",
"cyan": "#7dcfff",
"green": "#9ece6a",
"orange": "#ff9e64",
"purple": "#bb9af7",
"red": "#f7768e",
"white": "#787c99",
"yellow": "#e0af68"
},
{
"name": "Dracula",
"background": "#282a36",
"foreground": "#f8f8f2",
"black": "#21222c",
"blue": "#bd93f9",
"cyan": "#8be9fd",
"green": "#50fa7b",
"orange": "#ffb86c",
"purple": "#ff79c6",
"red": "#ff5555",
"white": "#f8f8f2",
"yellow": "#f1fa8c"
}
],
"window": {"theme": "dark"}
}Step 5 – Colorized ls output and useful aliases
Install a modern replacement or add color flags:
# Option 1: Rust‑based exa (no longer maintained but still works)
cargo install exa
# Option 2: Actively maintained lsd
sudo apt install lsd || cargo install lsd
# Option 3: Simple color flag for the default ls (most distros support it)
alias ls='ls --color=auto'
alias ll='ls -alF --color=auto'
alias la='ls -A --color=auto'
alias tree='tree -C'
# Append to ~/.bashrc and reload
cat >> ~/.bashrc <<'EOF'
alias ls='ls --color=auto'
alias ll='ls -alF --color=auto'
alias la='ls -A --color=auto'
alias tree='tree -C'
EOF
source ~/.bashrcExample output with colors:
📁 drwxr-xr-x 2 user user 4096 Apr 14 src ← directory (blue/cyan)
📄 -rw-r--r-- 1 user user 220 Apr 14 README.md ← file (white)
🔒 -rw------- 1 user user 1234 Apr 14 .env ← private file (red)
🔧 -rwxr-xr-x 1 user user 512 Apr 14 run.sh ← executable (green)Terminal shortcut key reference
Ctrl + Shift + T– New tab Ctrl + Shift + D – Split vertically Ctrl + Shift + 5 – Split horizontally Alt + Shift + ←/→ – Switch between panes Ctrl + , – Open settings Ctrl + Shift + W – Close current tab Ctrl + Shift + P – Command palette Ctrl + + / - – Zoom font size Ctrl + Shift + Space – Open default dropdown menu
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ubuntu
Focused on Ubuntu/Linux tech sharing, offering the latest news, practical tools, beginner tutorials, and problem solutions. Connecting open-source enthusiasts to build a Linux learning community. Join our QQ group or channel for discussion!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
