How to Make Your WSL Ubuntu Terminal Look Better with Oh My Posh

The default WSL Ubuntu terminal is functional, but it doesn’t give you much to work with — no Git branch info, no visual separation between commands, and no way to tell at a glance what directory you’re in without reading the full path.

Oh My Posh is a prompt theme engine that fixes all of that. It works with Bash, Zsh, and PowerShell, and gives you a customizable prompt with segments for Git status, execution time, timestamps, and more. This guide walks you through installing it on WSL Ubuntu with a Nerd Font and a clean theme.

Prerequisites

Step-by-Step Guide

Step 1: Install Oh My Posh

Run the official installer script:

curl -s https://ohmyposh.dev/install.sh | bash -s
  • curl -s — downloads the installer silently (no progress bar)
  • bash -s — pipes the script directly into Bash for execution

This installs the oh-my-posh binary to ~/.local/bin.

Step 2: Install a Nerd Font

Oh My Posh themes use icons and glyphs that require a Nerd Font — a patched font that includes symbols for Git, folders, clocks, and other prompt segments. Without it, you’ll see broken squares instead of icons.

Install one directly from Oh My Posh:

oh-my-posh font install

This opens an interactive list of available Nerd Fonts. FiraCode Nerd Font is a good default — it’s clean, monospaced, and widely used.

You can also browse and download fonts manually from nerdfonts.com.

Step 3: Configure Windows Terminal to Use the Nerd Font

The font needs to be set in your terminal emulator, not in WSL itself.

  1. Open Windows Terminal
  2. Press Ctrl + , to open Settings
  3. Go to Profiles > Ubuntu (or your WSL profile)
  4. Click Appearance
  5. Change Font face to the Nerd Font you installed (e.g., FiraCode Nerd Font)
  6. Optionally, pick a color scheme you like — One Half Dark works well
  7. Click Save

If the font doesn’t appear in the dropdown, close and reopen Windows Terminal after installing the font.

Step 4: Check Your Shell

Confirm which shell you’re running:

oh-my-posh get shell

This should output bash (the default shell on Ubuntu). Oh My Posh also supports zsh, fish, and others — but the configuration file differs by shell.

Step 5: Initialize Oh My Posh in Your Shell

Add Oh My Posh to your shell startup file so it loads every time you open a terminal.

Open ~/.bashrc in your editor:

nano ~/.bashrc

Add these lines at the bottom:

export PATH="$PATH:$HOME/.local/bin"
eval "$(oh-my-posh init bash)"
  • The PATH line ensures your shell can find the oh-my-posh binary
  • eval "$(oh-my-posh init bash)" — loads Oh My Posh with the default theme

Save the file and reload your shell:

source ~/.bashrc

You should see a styled prompt immediately. If it looks broken or shows square characters, double-check that your Windows Terminal font is set to a Nerd Font (Step 3).

Step 6: Apply a Custom Theme

The default theme is fine, but Oh My Posh ships with dozens of built-in themes. The clean-detailed theme is a good choice — it shows the current directory, Git branch, timestamp, and execution time in a two-line layout.

Update the eval line in your ~/.bashrc:

eval "$(oh-my-posh init bash --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/clean-detailed.omp.json')"
  • --config — points to a theme file (local path or URL)
  • The URL loads the theme directly from the Oh My Posh GitHub repository

Reload your shell to see the new theme:

source ~/.bashrc

Your full ~/.bashrc addition should now look like this:

export PATH="$PATH:$HOME/.local/bin"
eval "$(oh-my-posh init bash --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/clean-detailed.omp.json')"

To browse all available themes, run:

oh-my-posh get themes

Or preview them on the Oh My Posh themes page.

Step 7: Enable Live Reload (Optional)

By default, you need to run source ~/.bashrc after every config change to see the result. Live reload watches for changes and updates the prompt automatically:

oh-my-posh enable reload

This is useful while you’re experimenting with themes. Once you’ve settled on a configuration, you can turn it off:

oh-my-posh disable reload

What You Should See

After completing the setup, your terminal prompt will show:

  • Current directory with a folder icon
  • Git branch name and status (clean, modified, ahead/behind)
  • Timestamp on the right side of the prompt
  • Command execution time for long-running commands
  • Color-coded segments that make it easy to scan

My favorite local terminal theme setup : )

The exact layout depends on the theme you chose. The clean-detailed theme uses a two-line prompt with all of this information neatly organized.

Conclusion

Your WSL terminal now has a prompt that actually gives you useful information at a glance — Git status, directory context, and timestamps — without running extra commands.

If you’re setting up your WSL environment from scratch, you might also want to connect VS Code to WSL for a full development workflow, or set up pyenv to manage Python versions cleanly.