How to Install Oh My Posh on Debian: A Prompt Theme Engine for Any Shell
Oh My Posh is a prompt theme engine that works with virtually any shell. Rather than wiring together dozens of escape sequences by hand, you point Oh My Posh at a single JSON, YAML or TOML theme and it renders a fast, information-dense prompt: Git status, the active language runtime, cloud context, execution time and much more.
Unlike shell-specific frameworks, Oh My Posh is a standalone binary written in Go. That means the same configuration produces an identical prompt whether you are in Bash, Zsh, Fish, or PowerShell, which is a real convenience if you move between machines and shells during the day.
The catch on Debian is that Oh My Posh is not packaged in the official repositories, and the upstream project ships frequently. Installing manually leaves you pinning a binary you then have to update by hand. The unofficial deb.griffo.io repository solves this by providing an up-to-date, prebuilt oh-my-posh package that installs and updates cleanly through apt.
Install the Latest Oh My Posh on Debian: The Short Version
If you only came for the commands, this adds the repository and installs the latest Oh My Posh .deb package on Debian:
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 - Drive the whole prompt from one config file in JSON, YAML or TOML
- 🐚 Shell agnostic - Identical prompts across Bash, Zsh, Fish and PowerShell
- ⚡ Fast native binary - Written in Go, with no runtime dependency stack to install
- 🔩 Rich segments - Git, language runtimes, Kubernetes, AWS/Azure, battery, time and more
- 🧩 Templating engine - Conditional logic and Go templates for dynamic prompt content
- 🖋️ Nerd Font aware - First-class support for glyphs and powerline separators
- 🌈 Transient prompts - Collapse past prompts to keep scrollback clean
- 📦 100+ built-in themes - Ship-with themes you can adopt or fork instantly
Why Use the deb.griffo.io Repository?
- Easy installation and updates straight through the APT package manager
- Automatic dependency management handled by Debian packaging
- Always tracks upstream releases so you get new segments and fixes promptly
- No compiling from source and no manual binary juggling
- Works across supported Debian releases (Bookworm, Trixie and Sid)
Prerequisites
Before you start, make sure you have:
- A Debian-based system (Bookworm 12, Trixie 13, or Sid)
sudoprivilegescurlinstalled (sudo apt install curlif it is missing)- A Nerd Font installed in your terminal for the glyphs to render correctly
Step 1: Add the deb.griffo.io Repository
Add the signing key and the repository to 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
Here is what each step does:
- Keyrings directory - Creates
/etc/apt/keyringswith sane permissions, the modern home for third-party keys. - GPG key - Downloads the repository key and stores its de-armoured form so APT can verify package signatures.
- Repository entry - Registers the repository, pinning it to the key and letting
lsb_release -scfill in your Debian codename automatically. - Update - Refreshes the package index so the new packages become visible.
Step 2: Update the Package List
If you skipped the final line above, refresh the index now:
sudo apt update
Step 3: Install Oh My Posh
Install the package with a single command:
sudo apt install oh-my-posh
APT resolves dependencies and drops the oh-my-posh binary onto your PATH.
Step 4: Verify the Installation
Confirm the binary is present and check the version:
oh-my-posh --version
You should see output similar to:
26.19.0
Getting Started with Oh My Posh
Installing the binary does nothing to your prompt on its own. Oh My Posh has to be initialised by your shell’s startup file so it can hook into the prompt.
Initialise Your Shell
For Bash, add this to the end of ~/.bashrc:
eval "$(oh-my-posh init bash)"
For 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
Reload the shell (source ~/.bashrc, or open a new terminal) and the default theme takes over immediately.
Applying a Theme
The Debian package ships the full theme collection and exposes it through the POSH_THEMES_PATH environment variable. List what is available:
ls "$POSH_THEMES_PATH"
Point your init line at a specific theme with --config:
eval "$(oh-my-posh init bash --config "$POSH_THEMES_PATH/jandedobbeleer.omp.json")"
You can preview every bundled theme in one scroll:
oh-my-posh config export --format json # dump the active config to inspect it
Customising Your Own Config
Rather than editing a shipped theme in place, copy one into your home directory and point at that:
mkdir -p ~/.config/oh-my-posh
cp "$POSH_THEMES_PATH/atomic.omp.json" ~/.config/oh-my-posh/mytheme.omp.json
Update your init line to reference the copy:
eval "$(oh-my-posh init bash --config ~/.config/oh-my-posh/mytheme.omp.json)"
Now you can tweak segments, colours and templates without your changes being overwritten on the next package upgrade.
Installing a Nerd Font
Most themes use powerline glyphs and icons that require a Nerd Font. Oh My Posh can install one for you:
# Interactive picker
oh-my-posh font install
# Or install a specific family non-interactively
oh-my-posh font install Meslo
After installing, set your terminal emulator’s font to the matching “Nerd Font” variant, otherwise you will see missing-glyph boxes.
Enabling Transient Prompts
Transient prompts collapse the previous command’s prompt to a minimal form, keeping scrollback readable during long sessions:
oh-my-posh init bash --config ~/.config/oh-my-posh/mytheme.omp.json | source
enable_poshtransientprompt
Most users enable transient behaviour inside the theme’s transient_prompt block; consult the theme JSON to customise what the collapsed line shows.
Keeping Oh My Posh Updated
Because it is installed from the repository, upgrading is part of your normal system maintenance:
sudo apt update && sudo apt upgrade
New themes and segment fixes arrive as the package tracks upstream releases.
Other Tools from deb.griffo.io
The same repository packages plenty of other terminal tooling worth pairing with Oh My Posh:
- Starship - An alternative minimal, blazing-fast prompt for any shell
- zoxide - A smarter
cdthat learns your most-used directories - Atuin - Magical shell history with sync, search and context
- eza - A modern, maintained replacement for
ls
Troubleshooting
GPG or Key Errors
If APT complains that the repository cannot be verified, re-add the signing 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 install oh-my-posh reports that the package is unavailable:
- Run
sudo apt updateagain to ensure the index is current. - Confirm your release is supported (Bookworm, Trixie, or Sid).
- Inspect the source entry:
cat /etc/apt/sources.list.d/deb.griffo.io.list
Prompt Shows Boxes or Missing Glyphs
If your prompt renders with □ boxes or question marks, your terminal font lacks the required glyphs. Install a Nerd Font with oh-my-posh font install and switch your terminal emulator to the matching “Nerd Font” family. On Debian’s default GNOME Terminal, set this under Preferences → Profile → Text → Custom font.
Uninstalling
To remove Oh My Posh:
sudo apt remove oh-my-posh
Remember to delete the eval "$(oh-my-posh init …)" line from your shell startup file. To remove the repository entirely:
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 turns a plain Debian prompt into a fast, informative and consistent workspace across every shell you use. Installing it from deb.griffo.io means you get a maintained package that upgrades alongside the rest of your system, instead of a hand-placed binary you have to remember to refresh.
Add a shell init line, pick a theme, install a Nerd Font, and you have a prompt that scales from a quick SSH session to a full-day development environment.
Frequently Asked Questions
How do I install the latest Oh My Posh on Debian?
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 Debian. 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 Ubuntu?
Exactly the same way; lsb_release -sc simply resolves to a different codename. There is a companion guide with the Ubuntu specifics: How to install Oh My Posh on Ubuntu.
Which Debian releases are supported?
Bookworm 12, Trixie 13 and Sid. Because the repository line is built from lsb_release -sc, the matching suite is selected for you.
Resources
- Oh My Posh Official Website
- Oh My Posh Documentation
- Oh My Posh GitHub Repository
- deb.griffo.io Repository
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.