Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
Last active March 9, 2026 18:36
Show Gist options
  • Select an option

  • Save matthewjberger/7dd7e079f282f8138a9dc3b045ebefa0 to your computer and use it in GitHub Desktop.

Select an option

Save matthewjberger/7dd7e079f282f8138a9dc3b045ebefa0 to your computer and use it in GitHub Desktop.
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@WhateverMO
Copy link

I made a small, but useful to me, change to @donovan code. I added code to look up the latest version of nerd fonts and download those.我对代码做了一个小的但对我有用的更改。我添加了代码来查找最新版本的 nerd 字体并下载它们。

No need to introduce dependency on curl and jq. With proper download_url wget will be automatically redirected to the latest version无需引入对 curljq 的依赖。通过适当的 download_url wget 将自动重定向到最新版本 download_url="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${zip_file}"download_url=“https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${zip_file}

i tested use latest URL it not found

@pha5matis

thank you so much, it's good version

@kodejeet
Copy link

worked for me if someone is on the new TLS ubuntu

mkdir -p ~/.local/share/fonts
cd /tmp
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.zip
unzip FiraCode.zip -d ~/.local/share/fonts
fc-cache -fv

@nscarlson
Copy link

Don't bother with any of these crazy scripts. Instructions in original post is all you need.

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