How to setup fonts in Linux subsystem?

I’m trying to use the Linux subsystem for windows (a bit of an adventure for me not knowing Linux). I’ve installed and noticed I’ve got a number of badly rendering symbols. I’ve read that I need a powerline font so I’ve tried installing them and firacode (my preference).

I’ve however found that even after doing so I’m still getting errors rendering the characters.

enter image description here

Does anyone know what I might be missing? Ultimately I want to be able to swap out my git-bash for bash (in linux) within ConEmu if it’s relevant.

Super User Asked on November 18, 2021

3 Answers

3 Answers

How I solved this:

  1. Install "Sauce Code Pro Nerd Font" Unpack -> Open "whatever font you like".ttf and install. Check the installed font in a directory "C:WindowsFonts".

2.1) Open "Powershell", "Ubuntu" (or another WSL-distro), then right-click -> Properties -> Font -> Change font to "Sauce Code Pro Nerd Font".

2.2) If you use Windows Terminal. Open it -> "Ctrl+," -> find an attribute "profiles{...} -> defaults{...} -> add to "defaults" an attribute "fontFace": "SauceCodePro Nerd Font" to apply the font to all profiles or choose a profile from "list" and type the same to apply only to the given profile (e.x. "Cascadia Code PL" for Powershell, "SauseCode Pro Nerd Font" for Ubuntu).

  1. Optional. Open VSCode -> Ctrl+, -> fontFamily: type "SauseCodePro Nerd Font" before other fonts.

  2. You can do this with other fonts, but they need to support a powerline glyphs, e.g. "Mononoki" font.

Answered by Adilet Soronov on November 18, 2021

If you want to setup fonts in your WSL, you need to setup fonts in the host system, namely Windows.

Key points were in setup all powerline fonts in the host system; I noticed what some people tried to install .install.ps1 (PowerShell) the script of this powerline repo in WSL, but its script must be run in Windows PowerShell.

You have to change the execution policy on Windows 10. I tried setup on base this article, and it works.

And so, you can just install fonts manually and not have all problems.

Don't forget to apply font for WSL in settings.json

I also noticed that some ligatures work very badly or don't render at all.

Updated info:

Answered by Dmitry S. on November 18, 2021

TLDR; You need to install windows host and configure Powerline fonts bash gui properties.

found info here

you actually need to install these fonts in Windows and set the console host font to one of them.

Next open bash and click the icon in the upper left corner and select Properties. Change to the Font tab and select one of the patched fonts you just installed. They will all say "for Powerline" so just pick one of those.

Answered by Devidas on November 18, 2021

Add your own answers!

Related Questions

Automatic sleep vs Manual sleep

0  Asked on January 4, 2021


priority of the Linux group & user

1  Asked on January 3, 2021 by jw__fu


Delete a corrupt file in Linux

8  Asked on January 3, 2021 by stig


How to change brightness in FreeBSD?

1  Asked on January 1, 2021 by pouriya


Creating a symbolic link to mapped network drive in Windows

8  Asked on December 31, 2020 by vegard-larsen


Bash files open terminal when opened

1  Asked on December 31, 2020 by chris-smith


S3 command not working in cron

1  Asked on December 31, 2020 by kargirwar


Scale to fit option

6  Asked on December 30, 2020 by steven-penny


Ask a Question

Get help from others!

© 2021 All rights reserved.