Step‑by‑Step Guide to Install and Configure Powerline on Linux
This tutorial explains how to install Powerline and its fonts on various Linux distributions, configure it for Bash and Vim, troubleshoot common errors, and enable a colorful status line and prompt across terminals.
Powerline is a Python‑based status‑line plugin for Vim that also provides prompts for Bash, Zsh, tmux and other applications. It enhances the editor by showing mode, file name, path, line/column numbers, Git branch, virtual environment and more.
Key Features
Written in Python, extensible and feature‑rich.
Stable code base compatible with Python 2.6+ and Python 3.
Supports prompts and status bars in many Linux tools.
Configuration and color themes use JSON.
Lightweight with daemon support for better performance.
The article shows how to install Powerline and its fonts on both RHEL‑based and Debian‑based Linux distributions.
Installing Powerline
Powerline is published on PyPI under the package name powerline-status. First install pip using your distribution’s package manager:
$ sudo apt install python3-pip # Debian/Ubuntu/Mint
$ sudo yum install python3-pip # RHEL/CentOS/Fedora/Rocky/AlmaLinux
$ sudo emerge -a dev-lang/pip # Gentoo
$ sudo apk add py3-pip # Alpine
$ sudo pacman -S python-pip # Arch
$ sudo zypper install python3-pip # OpenSUSENext, install Git if it is not already present:
$ sudo apt install git # Debian/Ubuntu/Mint
$ sudo yum install git # RHEL/CentOS/Fedora/Rocky/AlmaLinux
$ sudo emerge -a git # Gentoo
$ sudo apk add git # Alpine
$ sudo pacman -S git # Arch
$ sudo zypper install git # OpenSUSEThen install Powerline itself: $ pip install powerline-status If you encounter the error externally-managed-environment, remove the marker file and retry:
$ sudo rm -rf /usr/lib/python3.x/EXTERNALLY-MANAGEDAlternatively, install Powerline directly from your package manager:
$ sudo apt install powerline # Debian/Ubuntu/Mint
$ sudo yum install powerline # RHEL/CentOS/Fedora/Rocky/AlmaLinux
$ sudo emerge -a sys-apps/powerline # Gentoo
$ sudo apk add powerline # Alpine
$ sudo pacman -S powerline # Arch
$ sudo zypper install powerline # OpenSUSEInstalling Powerline Fonts
Powerline uses special glyphs, so you need to install the Powerline symbols font or patched fonts.
If you installed Powerline via pip:
$ wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
$ wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
$ sudo mv PowerlineSymbols.otf ~/.local/share/fonts/
$ sudo fc-cache -vf ~/.local/share/fonts/
$ sudo mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/If you installed via a package manager:
$ sudo apt install fonts-powerline # Debian/Ubuntu/Mint
$ sudo yum install powerline-fonts # RHEL/CentOS/Fedora/Rocky/AlmaLinux
$ sudo emerge -a sys-apps/powerline-fonts # Gentoo
$ sudo apk add powerline-fonts # Alpine
$ sudo pacman -S powerline-fonts # Arch
$ sudo zypper install powerline-fonts # OpenSUSEEnabling Powerline in Bash
Add the following lines to ~/.bashrc (adjust the path according to the output of pip show powerline-status):
export TERM="screen-256color"
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
source /home/youruser/.local/lib/python3.10/site-packages/powerline/bindings/bash/powerline.shAfter re‑logging, you will see a colorful prompt with breadcrumb navigation, background job indicators, and host name when using SSH.
Enabling Powerline in Vim
Add the following to ~/.vimrc:
python3 from powerline.vim import setup as powerline_setup
python3 powerline_setup()
python3 del powerline_setup
set laststatus=2Start Vim to see the new status line.
Link: https://www.linuxmi.com/powerline-vim-bash-shell.html
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
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.
