want to install nerd font
- User
want to install nerd font
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
want to install nerd font
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Installing Nerd Fonts on Ubuntu is essential for getting icons and glyphs to render correctly in your terminal (e.g., for Oh My Posh, Powerline, or other tools). Here's a step-by-step guide to install Nerd Fonts:
Ensure you have curl and unzip installed:
sudo apt update
sudo apt install curl unzip fontconfig
Nerd Fonts provides a large collection of patched fonts. A popular choice is MesloLGS NF (Nerd Font version of Meslo).
Download and install MesloLGS NF (a widely used font):
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
# Download the font
curl -fLO https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip
# Extract the font
unzip Meslo.zip
# Clean up
rm Meslo.zip
# Update font cache
fc-cache -fv
If you want all available Nerd Fonts:
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
# Download and extract all fonts
curl -fLO https://github.com/ryanoasis/nerd-fonts/releases/latest/download/NerdFontsSymbolsOnly.zip
curl -fLO https://github.com/ryanoasis/nerd-fonts/releases/latest/download/NerdFontsComplete.zip
unzip NerdFontsSymbolsOnly.zip
unzip NerdFontsComplete.zip
# Clean up
rm *.zip
# Update font cache
fc-cache -fv
After installing the fonts, set MesloLGS NF (or your chosen font) as the default in your terminal emulator:
GNOME Terminal:
MesloLGS NF or your chosen font.Tilix:
MesloLGS NF.Kitty:
~/.config/kitty/kitty.conf and add:
font_family MesloLGS NF
Alacritty:
~/.config/alacritty.yml and update the font section:
font:
normal:
family: MesloLGS NF
style: Regular
size: 12
Open a new terminal or restart your terminal emulator. To verify Nerd Fonts are working, run:
echo "Powerline symbols: "
If you see icons instead of boxes, Nerd Fonts are working correctly!
To see all installed Nerd Fonts:
fc-list | grep "Nerd Font"
Icons not showing?
Font not found?
fc-cache -fv again to refresh the font cache.That's it! You now have Nerd Fonts installed and ready to use with Oh My Posh or any other tool that requires them. 🚀