Skip to content

Linux instructions

Usama edited this page Aug 10, 2021 · 36 revisions

IMPORTANT

Starting from v5, Fira Code does not distribute OTF. All packages here that have otf-* in the name are now outdated and should be replaced with ttf equivalents.

Installing with a Package Manager

Ubuntu Zesty (17.04), Debian Stretch (9) or newer

  1. Make sure that the universe (for Ubuntu) or contrib (for Debian) repository is enabled (see how-to for Ubuntu or Debian docs)
  2. Install fonts-firacode package either by executing sudo apt install fonts-firacode in the terminal or via GUI tool (like “Software Center”)

Arch Linux

Fira Code package is available in the official repository: ttf-fira-code.

Variant of Fira Code package is available in the AUR: otf-fira-code-git.

Gentoo

emerge -av media-fonts/fira-code

Fedora

Fira Code package is available in the official repository.

To install, perform the following command:

dnf install fira-code-fonts

Solus

sudo eopkg install font-firacode-ttf

Void linux

xbps-install font-firacode

Ubuntu

sudo apt install fonts-firacode

Manual Installation

With most desktop-oriented distributions, double-clicking each font file in the ttf folder and selecting “Install font” should be enough. If it isn’t, create and run download_and_install.sh script:

#!/usr/bin/env bash

fonts_dir="${HOME}/.local/share/fonts"
if [ ! -d "${fonts_dir}" ]; then
    echo "mkdir -p $fonts_dir"
    mkdir -p "${fonts_dir}"
else
    echo "Found fonts dir $fonts_dir"
fi

for type in Bold Light Medium Regular Retina SemiBold; do
    file_path="${HOME}/.local/share/fonts/FiraCode-${type}.ttf"
    file_url="https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true"
    if [ ! -e "${file_path}" ]; then
        echo "wget -O $file_path $file_url"
        wget -O "${file_path}" "${file_url}"
    else
	echo "Found existing file $file_path"
    fi;
done

echo "fc-cache -f"
fc-cache -f

More details