Category Filter

Script to Install Font in macOS devices

Within an organization, you might require special fonts to be distributed for specific users. You might be using these in the documents for customers or while creating presentations. Regardless of the circumstance, getting these fonts installed manually is quite time-consuming, considering the process involves visiting different sites that host the fonts, downloading them, and double-clicking on the downloaded files on each device to install the font. You can simplify this process using Hexnode’s
Execute Custom Script

You can use the below script to install fonts to Font Book in devices by running a simple command.

Scripting Language – Bash

File extension – .sh


The Sample Scripts provided below are adapted from third-party Open-Source sites.

Install fonts to Font Book

Use the below command to make the font available to the logged in user. You can copy either of the font types, True Type Fonts (TTF) or Open Type Fonts (OTF), using this command.

For example, a logged in user ‘User1’ with the font ‘helvetica.ttf’ in the Downloads folder, can use the following command to install it in Font Book.

Ex: cp –R /users/user1/Downloads/helvetica.ttf ~/Library/Fonts/

Alternatively, to make the font available for all existing and newly created users on the system, the font needs to be copied to the system’s font folder.


  • You can choose one of the following locations depending on your needs:
    • /Library/Fonts applies to every user, existing and newly created.
    • ~/Library/Fonts applies to the current user.
    • /Library/User Template/Non_localized/Library/Fonts applies to new users.
  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.