Skip to content

Instantly share code, notes, and snippets.

@petercossey
Last active July 12, 2022 12:44
Show Gist options
  • Save petercossey/69ff13fe366beec4b1df7f42f5fb4faf to your computer and use it in GitHub Desktop.
Save petercossey/69ff13fe366beec4b1df7f42f5fb4faf to your computer and use it in GitHub Desktop.
Powerline font install for Ubuntu 16.10 (also confirmed working for 17.04, 17.10, 18.04, 19.10)

Install Powerline fonts for Z shell

Please note: there is an APT package called "fonts-powerline" which is tested and working for Ubuntu 20.04 which achieves the same outcome. Try "sudo apt install fonts-powerline"

If you're using Z Shell and a special prompt theme designed with Powerline fonts in mind, you'll need to install them on your machine. These are the most clear and cut-down instructions that I've found to work with Ubuntu 16.10 (also confirmed working for 17.04, 17.10, 18.04, 19.10) and all credit goes to renshuki's Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme gist. I've extracted just the Powerline font instructions - my personal setup uses Prezto instead of Oh My ZSH (not included here).

Get the font and config files

cd ~
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
mkdir ~/.fonts #if directory doesn't exist
mv PowerlineSymbols.otf ~/.fonts/
mkdir -p ~/.config/fontconfig/conf.d #if directory doesn't exists

Clear fonts cache

fc-cache -vf ~/.fonts/

Move config file

mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/

Finito

Restart your terminal and your powerline fonts should be working.

@petercossey
Copy link
Author

I just tested this on a fresh install of Ubuntu 19.10 and it worked.

@tomasnorre
Copy link

I'm on Ubuntu Budgie 20.04 and for me it was enough to install the fonts-powerline with apt install

$ sudo apt install fonts-powerline

@Gil96
Copy link

Gil96 commented May 6, 2020

Oh my god, thanks a lot !!

@petercossey
Copy link
Author

@tomasnorre - thanks for the tip. I just came back to my Gist after installing Ubuntu 20.04 and saw your comment. I've added a note to the top.

@rodrigolece
Copy link

Working for 16.04, I spent a couple of hours on this and your solution worked. Hero! 😀

@logycon
Copy link

logycon commented Jul 25, 2020

Thanks, this helped!
One correction -

mkdir -p ~/.config/fontconfig/conf.d #if directory doesn't exists

@petercossey
Copy link
Author

Thanks, this helped!
One correction -

mkdir -p ~/.config/fontconfig/conf.d #if directory doesn't exists

Oh, good idea. FYI, the first command in the list is "cd ~" but you're right... it's a much better idea to have the full/correct path in the mkdir command instead of relying on that first step. Thanks for the feedback!

@FalcoVerhagen
Copy link

Works like a charm! Thanks!!

@rafaelribeiroo
Copy link

rafaelribeiroo commented Nov 18, 2020

There's one workaround to prevent terminal restart after installation? Some command or ...?

@petercossey
Copy link
Author

There's one workaround to prevent terminal restart after installation? Some command or ...?

@rafaelribeiroo I'm not aware of any workaround that could avoid the terminal restart. But please let me know if you find anything.

@rafay99-epic
Copy link

Thank you Brother... I was looking for theses font for a while...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment