I want to install ‘Hack Nerd Font’ on my laptop running Fedora 40. As of today, there is no RPM package that I am aware of that provides this font. Therefore, I would need to download and install the font manually.

  1. Visit the Nerd font website, to choose a preferred font.
  2. I like Hack Nerd Font. It can be downloaded from the Download link.
  3. Unzip the downloaded (e.g. Hack.zip) and move or copy the directory to ~/.local/share/fonts directory.
  4. Run fc-cache -fv to refresh the font cache.

Here is now the above steps are performed using command line:

➜ curl -o /tmp/Hack.zip -L https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Hack.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
100 15.2M  100 15.2M    0     0  1482k      0  0:00:10  0:00:10 --:--:-- 4230k


➜ unzip /tmp/Hack.zip -d ~/.local/share/fonts/
Archive:  /tmp/Hack.zip
  inflating: /home/kenno/.local/share/fonts/HackNerdFontPropo-Regular.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFontMono-Regular.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFont-Regular.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFontPropo-BoldItalic.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFontMono-BoldItalic.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFont-BoldItalic.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFont-Italic.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFontMono-Italic.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFontPropo-Italic.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFontPropo-Bold.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFont-Bold.ttf
  inflating: /home/kenno/.local/share/fonts/HackNerdFontMono-Bold.ttf
  inflating: /home/kenno/.local/share/fonts/LICENSE.md
  inflating: /home/kenno/.local/share/fonts/README.md


➜ fc-cache -vf ~/.local/share/fonts/
Font directories:
        /home/kenno/.local/share/fonts
/home/kenno/.local/share/fonts: caching, new cache contents: 12 fonts, 0 dirs
/usr/lib/fontconfig/cache: not cleaning unwritable cache directory
/home/kenno/.cache/fontconfig: cleaning cache directory
/home/kenno/.fontconfig: not cleaning non-existent cache directory
/usr/bin/fc-cache-64: succeeded

Verify the installed fonts:

➜ fc-list : family style | grep -i nerd
Hack Nerd Font Mono:style=Italic
Hack Nerd Font Propo:style=Italic
Hack Nerd Font Mono:style=Regular
Hack Nerd Font Propo:style=Bold
Hack Nerd Font:style=Regular
Hack Nerd Font:style=Bold Italic
Hack Nerd Font:style=Italic
Hack Nerd Font:style=Bold
Hack Nerd Font Mono:style=Bold
Hack Nerd Font Mono:style=Bold Italic
Hack Nerd Font Propo:style=Bold Italic
Hack Nerd Font Propo:style=Regular

That’s it. Now I can start using Hack Nerd Font mono in applications such as Alacirty.

References: