setfont
Load console screen fonts for Linux TTYs
TLDR
SYNOPSIS
setfont [OPTIONS] [font.new...] [-m cmap] [-u umap] [-C console]
DESCRIPTION
setfont loads console screen fonts into the EGA/VGA character generator for Linux virtual terminals (TTYs). It can load PSF (PC Screen Font) files and optionally associate Unicode mapping tables for proper character display.Fonts are typically stored in /usr/share/kbd/consolefonts/ and come in various sizes (8x8, 8x14, 8x16). The command operates on the current console by default but can target specific TTYs with -C. When called without arguments, it loads a default 8x8 font.
PARAMETERS
-d, --double
Double the font size for high-density displays.-h N, --font-height N
Override font height (useful for partial fonts).-N, --default8x=N
Load the built-in default font of width N (8xN).-o file, --output-font=file
Save the previous font to file before loading the new one.-O file, --output-fullfont=file
Save the previous font together with its Unicode map to file.-om file, --output-consolemap=file
Save the current console mapping table to file.-ou file, --output-unicodemap=file
Save the current Unicode mapping table to file.-m file, --consolemap=file
Load console map or Unicode console map from file.-u file, --unicodemap=file
Load the Unicode mapping table that describes the font.-C device, --console=device
Set the font on the specified console device.-f, --force
Force-load the Unicode map even if it is empty.-R, --reset
Restore the console font, size, and Unicode mapping to boot-up defaults.-v, --verbose
Enable verbose output.-V, --version
Print version and exit.
CAVEATS
Only works on Linux virtual consoles (TTYs), not in terminal emulators like xterm or GNOME Terminal. Requires appropriate permissions (typically root) to modify console settings. Font changes do not persist across reboots; configure in /etc/vconsole.conf for systemd systems or appropriate init scripts.
HISTORY
setfont is part of the kbd (keyboard and console utilities) package, which has been a standard Linux component since the early 1990s. The PSF font format was developed specifically for Linux console fonts. The command evolved from earlier utilities like loadfont and integrates Unicode support added in Linux 2.0 era.
SEE ALSO
showconsolefont(8), loadkeys(1), consolechars(8)
