Skip to content

Instantly share code, notes, and snippets.

@rajeshkumaravel
Created December 7, 2023 13:38
Show Gist options
  • Save rajeshkumaravel/2795c341f4adf9daffb1791dd5bd3004 to your computer and use it in GitHub Desktop.
Save rajeshkumaravel/2795c341f4adf9daffb1791dd5bd3004 to your computer and use it in GitHub Desktop.
Installing a Font in WSL (Windows Subsystem for Linux)

Installing a Font in WSL (Windows Subsystem for Linux)

To install a font in WSL, follow these steps:

  1. Check Font Location: Confirm that the font file (e.g., VictorMono.ttf) is located in a directory accessible from your WSL instance. You can copy the font file to your WSL home directory for simplicity.

  2. Install Font: You can use the fc-cache command to update the font cache in WSL and make the font available. Open a terminal in your WSL instance and run the following commands:

    sudo cp /mnt/c/path/to/VictorMono.ttf /usr/local/share/fonts/
    sudo fc-cache -fv

    Note that /mnt/c is the path to the C: drive in Windows when you're working within WSL.

  3. Verify Installation: You can verify that the font is installed by running the following command in your WSL terminal:

    fc-list | grep "Victor Mono"

Hope this help !!

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