Operations 4 min read

How to Install and Customize Oh My Posh for a Colorful Terminal Prompt

This guide explains what Oh My Posh is, how to install it on Windows, macOS, and Linux via GitHub or Microsoft Store, configure fonts with Nerd Fonts, edit the PowerShell profile, and apply themes to create a vibrant, customizable terminal prompt.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to Install and Customize Oh My Posh for a Colorful Terminal Prompt

What Is Oh My Posh?

Oh My Posh is a terminal prompt beautification tool that lets you replace the default black‑and‑white command line with a highly customizable, colorful prompt. It works across multiple shells such as PowerShell, Bash, and Zsh.

Installation

Download the binary from the official GitHub repository: https://github.com/JanDeDobbeleer/oh-my-posh If you cannot access GitHub, you can request the binary via private message. For Windows users, the easiest method is to install the app from the Microsoft Store.

Installation screenshot
Installation screenshot

Font Configuration

Oh My Posh relies on special glyphs, so you need a patched font. Download a Nerd Font from: https://www.nerdfonts.com/font-downloads Install the font on your system and set it as the terminal font (e.g., in Windows Terminal).

Font selection
Font selection

Configure the PowerShell Profile

Locate your PowerShell profile file: $PROFILE Open it with Notepad: notepad $PROFILE Add the following line (replace 1_shell with the desired theme name):

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\1_shell.omp.json" | Invoke-Expression

Save the file and restart PowerShell (preferably in Windows Terminal with administrator rights).

Prompt after configuration
Prompt after configuration

Key Features

Full use of the terminal’s color palette to create vibrant prompts.

Easy adjustment of existing themes or creation of custom ones, from simple tweaks to complete redesigns.

Cross‑shell and cross‑machine consistency: the same configuration works in PowerShell, Bash, Zsh, etc.

Further Information

For more themes, detailed documentation, and updates, visit the official Oh My Posh repository or website.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Nerd FontsterminalPowerShellOh My Poshprompt customization
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.