Configure Linux Console Font

January 2019 ยท 1 minute read

Linux provides a way to set fonts and keymaps on the virtual consoles (tty[1-7]). I’ll focus on fonts in this post. The available fonts can be found in /usr/share/kbd/consolefonts/ and can be set as follows:

If there is a file in /usr/share/kbd/consolefonts/ named ter-powerline-v18n.psf.gz, you can set it as the terminal font for the current console by running the following command:

setfont ter-powerline-v18n

Note that this won’t work in a terminal emulator. You might get an error like: Couldn't get a file descriptor referring to the console.

But the above command sets the font in the current console only and that too without persistence. To set the font at boot for all consoles, edit (or create) the file /etc/vconsole.conf and add this line:

# in /etc/vconsole.conf
FONT=ter-powerline-v18n

Now you can either reboot the machine or load the changes without reboot using the command:

localectl set-keymap MAP  # where MAP is the locale map (us, uk etc.)

References:

[1] Linux console in Arch Wiki.\
[2] Linux console/Keyboard configuration in Arch Wiki.