Skip to content

Instantly share code, notes, and snippets.

@andrzejsliwa
Forked from rajeshkumaravel/steps.md
Created October 11, 2024 09:37
Show Gist options
  • Save andrzejsliwa/9df2d6f249c82e1ddb784d9d07c9e6fb to your computer and use it in GitHub Desktop.
Save andrzejsliwa/9df2d6f249c82e1ddb784d9d07c9e6fb 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