How to Install Oh My Posh on Ubuntu: A Prompt Theme Engine for Any Shell

Oh My Posh is a cross-shell prompt theme engine. Instead of hand-crafting PS1 escape sequences, you describe the prompt you want in a single theme file and let Oh My Posh render it: current Git branch and dirty state, the language runtime in the directory, cloud and Kubernetes context, command duration and plenty more.

What sets it apart from shell-specific frameworks is that it is a self-contained Go binary. The same theme produces the same prompt in Bash, Zsh, Fish or PowerShell, so a config you like on your Ubuntu laptop travels unchanged to a server or a container.

Ubuntu does not carry Oh My Posh in its default archives, and the project releases often, so a manual install quickly falls behind. The unofficial deb.griffo.io repository fixes that by shipping a prebuilt oh-my-posh package that you install and keep current with plain apt.

Install the Latest Oh My Posh on Ubuntu: The Short Version

If you only came for the commands, this adds the repository and installs the latest Oh My Posh .deb package on Ubuntu:

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt update
sudo apt install oh-my-posh

The rest of this guide explains what each command does, how to verify the install, how to keep Oh My Posh up to date, and what to check when something goes wrong.

What Makes Oh My Posh Special?

  • 🎨 Fully themeable - One config file, in JSON, YAML or TOML, drives the entire prompt
  • 🐚 Shell agnostic - The same prompt in Bash, Zsh, Fish and PowerShell
  • ⚡ Fast native binary - Compiled Go with no interpreter or plugin manager to install
  • 🔩 Rich segments - Git, language versions, AWS/Azure, Kubernetes, battery, clock and more
  • 🧩 Templating engine - Go templates and conditionals for a prompt that reacts to context
  • 🖋️ Nerd Font aware - Built for powerline separators and icon glyphs
  • 🌈 Transient prompts - Shrink previous prompts so long sessions stay readable
  • 📦 100+ built-in themes - Adopt a ready-made look or fork one as a starting point

Why Use the deb.griffo.io Repository?

  • Easy installation and updates through the familiar APT workflow
  • Automatic dependency management courtesy of Debian/Ubuntu packaging
  • Always tracks upstream releases so new features land without manual effort
  • No compiling from source and no chasing GitHub release tarballs
  • Works across supported Ubuntu releases with the codename detected automatically

Prerequisites

Make sure you have the following before starting:

  • An Ubuntu system (Jammy 22.04 LTS, Noble 24.04 LTS, or newer)
  • sudo privileges
  • curl installed (sudo apt install curl if needed)
  • A Nerd Font in your terminal so glyphs render correctly

Step 1: Add the deb.griffo.io Repository

Register the signing key and repository with APT:

# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings

# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg

# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null

# Update the package list
sudo apt update

Breaking that down:

  1. Keyrings directory - Ensures /etc/apt/keyrings exists with the correct permissions for third-party keys.
  2. GPG key - Fetches the repository key and stores it in de-armoured form for signature verification.
  3. Repository entry - Adds the source, binds it to the key, and uses lsb_release -sc to insert your Ubuntu codename (for example noble).
  4. Update - Pulls in the new package metadata.

Step 2: Update the Package List

Refresh the index if you have not already:

sudo apt update

Step 3: Install Oh My Posh

Install with a single command:

sudo apt install oh-my-posh

APT handles the download and puts the oh-my-posh binary on your PATH.

Step 4: Verify the Installation

Check that it installed correctly:

oh-my-posh --version

Expected output looks like:

26.19.0

Getting Started with Oh My Posh

The binary alone will not change your prompt. Oh My Posh needs to be initialised from your shell’s startup file.

Initialise Your Shell

Ubuntu ships Bash as the default login shell. Add this to the end of ~/.bashrc:

eval "$(oh-my-posh init bash)"

If you use Zsh, add this to ~/.zshrc:

eval "$(oh-my-posh init zsh)"

For Fish, add this to ~/.config/fish/config.fish:

oh-my-posh init fish | source

Open a new terminal (or source ~/.bashrc) and the default theme is live.

Choosing a Theme

The package installs the complete theme library and exposes its location via the POSH_THEMES_PATH variable. Browse the collection:

ls "$POSH_THEMES_PATH"

Load a specific theme by passing --config to the init call:

eval "$(oh-my-posh init bash --config "$POSH_THEMES_PATH/paradox.omp.json")"

The jandedobbeleer, atomic, powerlevel10k_rainbow and night-owl themes are popular starting points.

Keeping Your Own Config

To avoid losing edits on the next upgrade, copy a theme into your home directory and edit the copy:

mkdir -p ~/.config/oh-my-posh
cp "$POSH_THEMES_PATH/paradox.omp.json" ~/.config/oh-my-posh/mytheme.omp.json

Then reference it from your init line:

eval "$(oh-my-posh init bash --config ~/.config/oh-my-posh/mytheme.omp.json)"

From here you can adjust segments, colours, and the Go templates that control conditional content.

Installing a Nerd Font

Themes rely on powerline separators and icon glyphs from a Nerd Font. Let Oh My Posh install one:

# Interactive picker
oh-my-posh font install

# Or a specific family, non-interactively
oh-my-posh font install FiraCode

Then set your terminal profile to the matching “Nerd Font” variant so the glyphs display.

Inspecting and Debugging the Prompt

If a segment is not behaving, export the active configuration to see exactly what is being rendered:

oh-my-posh config export --format json
oh-my-posh debug

The debug command times each segment, which is handy for spotting a slow Git segment in a large repository.

Keeping Oh My Posh Updated

Upgrading is just part of routine system maintenance:

sudo apt update && sudo apt upgrade

The package follows upstream, so new segments and bug fixes arrive with your normal updates.

Other Tools from deb.griffo.io

The repository packages other terminal essentials that complement Oh My Posh nicely:

  • Starship - An alternative minimal, blazing-fast prompt for any shell
  • zoxide - A smarter cd that ranks directories by frecency
  • Atuin - Magical shell history with sync, search and context
  • eza - A modern, maintained replacement for ls

Troubleshooting

GPG or Key Errors

If APT reports that the repository cannot be verified, re-import the key:

sudo rm -f /etc/apt/keyrings/deb.griffo.io.gpg
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

Package Not Found

If APT cannot locate the oh-my-posh package:

  1. Run sudo apt update to refresh the index.
  2. Confirm you are on a supported release (Jammy 22.04, Noble 24.04, or newer).
  3. Check the source entry: cat /etc/apt/sources.list.d/deb.griffo.io.list

Prompt Shows Boxes or Missing Glyphs

Boxes and question marks in the prompt mean the terminal font has no glyphs for the theme. Install a Nerd Font with oh-my-posh font install, then set the font under your terminal’s Preferences → Profile → Text. On Ubuntu’s default GNOME Terminal, untick “Use system fixed width font” and pick the Nerd Font variant.

Uninstalling

To remove Oh My Posh:

sudo apt remove oh-my-posh

Also delete the eval "$(oh-my-posh init …)" line from your shell startup file. To remove the repository as well:

sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

Conclusion

Oh My Posh gives Ubuntu users a fast, consistent and richly informative prompt that behaves the same across every shell. Installing from deb.griffo.io keeps it current through the same apt upgrade you already run, so you are never stuck with a stale hand-placed binary.

Wire up a shell init line, pick a theme, install a Nerd Font, and your terminal is ready for anything from a quick command to a full development session.

Frequently Asked Questions

How do I install the latest Oh My Posh on Ubuntu?

Add the deb.griffo.io APT repository and its signing key, then run sudo apt install oh-my-posh. The repository tracks upstream Oh My Posh releases, so you get the latest packaged version rather than a build frozen when your distribution was released.

Is there a .deb package for Oh My Posh?

Yes. deb.griffo.io publishes Oh My Posh as a signed .deb for Ubuntu. You could download that .deb and install it by hand, but adding the repository is the better option: APT then resolves dependencies and picks up new versions on its own.

How do I update Oh My Posh to the latest version?

Run sudo apt update && sudo apt upgrade. Once Oh My Posh is installed from APT there is no separate updater to remember, since new releases arrive with the rest of your system updates.

How do I install Oh My Posh on Debian?

Exactly the same way; lsb_release -sc simply resolves to a different codename. There is a companion guide with the Debian specifics: How to install Oh My Posh on Debian.

Which Ubuntu releases are supported?

Jammy 22.04 LTS, Noble 24.04 LTS and newer. Because the repository line is built from lsb_release -sc, the matching suite is selected for you.

Resources


Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream Oh My Posh project.