Ansible
Docker
Linux
terraform
NerdFonts
Installing Nerd Fonts
Visit the Nerd font website or GitHub Repo , to download a preferred font. My personal favorite is JetBrainsMono.
Unzip the downloaded zip file and move/copy the directory to ~/.local/share/fonts directory. You can use /usr/share/fonts instead to make the fonts available system wide. (Tested on Fedora and Debian)
Run fc-cache -vf to refresh the font cache.
Example
Download
Bash $ curl -o /tmp/JetBrainsMono.zip -L https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/JetBrainsMono.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
100 123M 100 123M 0 0 3796k 0 0 :00:33 0 :00:33 --:--:-- 4716k
Unzip
Bash $ unzip /tmp/JetBrainsMono.zip -d ~/.local/share/fonts/
Archive: /tmp/JetBrainsMono.zip
inflating: /home/legion/.local/share/fonts/JetBrainsMonoNerdFont-Italic.ttf
inflating: /home/legion/.local/share/fonts/JetBrainsMonoNerdFontPropo-Italic.ttf
*** Output omitted ***
inflating: /home/legion/.local/share/fonts/README.md
Refresh the font cache
Bash $ fc-cache -vf ~/.local/share/fonts/
Font directories:
/home/user/.local/share/fonts
/home/user/.local/share/fonts: caching, new cache contents: 96 fonts, 0 dirs
/usr/lib/fontconfig/cache: not cleaning unwritable cache directory
/home/user/.cache/fontconfig: cleaning cache directory
/home/user/.fontconfig: not cleaning non-existent cache directory
/usr/bin/fc-cache-64: succeeded
Verify
Bash $ fc-list : family style | grep -i nerd
JetBrainsMonoNL Nerd Font Propo,JetBrainsMonoNL NFP:style= Bold Italic
JetBrainsMono Nerd Font Mono,JetBrainsMono NFM,JetBrainsMono NFM ExtraBold:style= ExtraBold,Regular
JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style= Italic
*** Output Omitted ***
JetBrainsMono Nerd Font Propo,JetBrainsMono NFP,JetBrainsMono NFP ExtraBold:style= ExtraBold Italic,Italic
JetBrainsMonoNL Nerd Font Mono,JetBrainsMonoNL NFM,JetBrainsMonoNL NFM SemiBold:style= SemiBold Italic,Italic
Bash Script
You can also use a script to automate it. I found this good script made by pedoc & fixed by pha5matis .
Bash #!/bin/bash
declare -a fonts =(
BitstreamVeraSansMono
CascadiaCode
CodeNewRoman
DroidSansMono
FiraCode
FiraMono
Go-Mono
Hack
Hermit
JetBrainsMono
Meslo
Noto
Overpass
ProggyClean
RobotoMono
SourceCodePro
SpaceMono
Ubuntu
UbuntuMono
)
version = $( curl -s 'https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest' | jq -r '.name' )
if [ -z " $version " ] || [ " $version " = "null" ] ; then
version = "v3.2.1"
fi
echo "latest version: $version "
fonts_dir = " ${ HOME } /.local/share/fonts"
#fonts_dir="/usr/share/fonts"
if [[ ! -d " $fonts_dir " ]] ; then
mkdir -p " $fonts_dir "
fi
for font in " ${ fonts [@] } " ; do
zip_file = " ${ font } .zip"
download_url = "https://github.com/ryanoasis/nerd-fonts/releases/download/ ${ version } / ${ zip_file } "
echo "Downloading $download_url "
wget " $download_url "
unzip -o " $zip_file " -d " $fonts_dir " # Added the -o option here to allow replacing
rm " $zip_file "
done
find " $fonts_dir " -name 'Windows Compatible' -delete
fc-cache -fv
About Author
Systems & Network Administrator (CCNA) whose been in IT since 2008. Has strong working knowledge of Linux for servers and networking & is passionate about everything computer and technology.