Install JetBrains Mono Font on Linux

Install JetBrains Mono Font on Linux
There are hundreds of fonts for IDEs and editors. The one that is pleasing to my eyes is JetBrains Mono. It is natural for a Java developer to find the default font of the IDE to be aesthetically pleasing to the eyes, but JetBrains Mono font looks nice in Sublime Text, VSCode, even the plain text editor and the terminal. The font is free, open-source, and designed with a developer-centric focus.

In 2020 when announcing the JetBrains Mono, the team mentioned what they have considered in designing the font:

While working on JetBrains Mono we focused, among other things, on the issues that can cause eye fatigue during long sessions of working with code. We have considered things like the size and shape of letters; the amount of space between them, a balance naturally engineered in monospace fonts; unnecessary details and unclear distinctions between symbols, such as I’s and l’s for example; and programming ligatures when developing our font.

JetBrains Mono is the default font in all IntelliJ products. However, this article provides a quick command to install and keep updating the font without visiting the official site or GitHub page of JetBrains Mono font.

Step 01:
Create a new script named with the following code.



get_latest_release() {
  curl --silent "$1/releases/latest" | 
    grep '"tag_name":' | 
    sed -E 's/.*"([^"]+)".*/\1/'

# Define the latest url
version=$(get_latest_release "$repo/$name")

# Clear the existing folders
rm -rf /tmp/$file_name
rm -rf /tmp/fonts

# Download the zip
wget $url -P /tmp/

# Extract and install the fonts
unzip -o /tmp/$file_name -d /tmp/

# Install the fonts
if [ `id -u` = 0 ] ; then
  sudo mv /tmp/fonts /usr/share/fonts/JetBrainsMono
  mv /tmp/fonts ~/.local/share/fonts/JetBrainsMono
fc-cache -f -v

# Clean the tmp dir
rm -rf /tmp/$file_name
rm -rf /tmp/fonts

Step 02:
Make the script executable.

chmod +x

Step 03:

Run the script with sudo to install the font for all users or without sudo to install for the current user only. You can rerun this script whenever you want to upgrade the font with the latest version.
sudo ./


Instead of all these three steps, you can run the following command to download this script from our GitHub repository and run it straight away.

curl -s | bash -s

After installing JetBrains Mono, feel free to use the font in any of your favorite editors.


No comments

Post a Comment



© all rights reserved