Install Font on Linux


Here's how to install a new font on Linux for your user.

Where Fonts Live

The font files -- those happy .ttfs -- need a place to live. Give them hearth and home:

mkdir ~/.fonts

Get a Font

If you need a good one, you coder types, grab a beautiful mono font -- no, better!, nerd font: IBM Plex Mono:

wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/IBMPlexMono.zip

If you have your own flavor of nerdy, find your own:

xdg-open https://www.nerdfonts.com/font-downloads

Then get all those .ttfs moved into their new digs:

unzip IBMPlexMono.zip -d ~/.fonts

See Installed Fonts

To see all the fonts that your system can see, run fc-list, then filter with ripgrep to your newly-install font:

fc-list | rg Blex

That'll return the path to the font file and the name of the font, such as:

...
/home/jaketrent/.fonts/BlexMonoNerdFontMono-SemiBold.ttf: BlexMono Nerd Font Mono,BlexMono Nerd Font Mono SemiBold:style=SemiBold,Regular
...

Use the Font

Now that we know the font name, we can do things with it, like set the font for our terminal, alacritty. Open up the hood:

nvim ~/.config/alacritty/alacritty.yml

And stick that font (BlexMono Nerd Font Mono) in there:

font:
  normal:
    family: "BlexMono Nerd Font Mono"
    style: SemiBold

Mono forever!