Inspect the Active Linux Console Font with showconsolefont

showconsolefont is a read-only way to see exactly which font is loaded on a Linux virtual console. This guide covers checking its row and column geometry, and aiming the query at a named console when your current terminal is not the one you mean. The examples use showconsolefont from kbd 2.6.4, installed here as package version 2.6.4-2ubuntu2.

Allow about ten minutes. You need the kbd package and access to a Linux virtual console such as /dev/tty1. A graphical terminal emulator, SSH session or pseudo-terminal is not necessarily a console device, so a command that is correct for a virtual terminal can fail when copied into one of those sessions. This guide only reads state. It does not load a font or change a console.

1. Confirm the installed command

Start with ordinary, unprivileged checks. They establish which executable and package version you are about to use:

$ command -v showconsolefont
/usr/bin/showconsolefont
$ showconsolefont --version
showconsolefont from kbd 2.6.4
$ dpkg-query -W -f='${Package} ${Version}\n' kbd
kbd 2.6.4-2ubuntu2

The exact package version is distribution-specific. The program's --version output identifies the kbd release, while the package query identifies the distribution package revision. If your output differs, keep the local version in your notes when comparing results with another machine.

2. Check the virtual console you are actually using

Ask the shell what its standard input is connected to:

$ tty
/dev/tty1

Your path may be /dev/tty2, a serial device, or a pseudo-terminal such as /dev/pts/3. A /dev/pts/ result means you are in a pseudo-terminal, commonly from SSH or a terminal emulator. It is not evidence that the console font is unavailable; it means this process is not attached directly to a virtual console.

Checkpoint: continue with the no-option command only when tty reports the virtual console whose font you want to inspect. If it reports a pseudo-terminal, switch to the relevant Linux virtual terminal with a local keyboard, or use the explicit console option in the next step.

3. Print the current font table

With a real virtual console as the command's terminal, run:

$ showconsolefont

The command writes the current console font to standard output. The font table is deliberately not reproduced here because its size and values depend on the console font loaded on that host. Redirect it if you need to capture the result for an incident record:

$ showconsolefont > /tmp/console-font.txt
$ wc -l /tmp/console-font.txt

The temporary file is only a copy of command output. Remove it when it is no longer needed:

$ rm -- /tmp/console-font.txt

This is the only removal in the guide, and it affects only the explicitly named temporary file. Do not redirect over a configuration file when you only intend to collect evidence.

4. Get the font dimensions without the table

Use -i when you need the font dimensions rather than every glyph value:

$ showconsolefont -i
ROWSxCOLSxCOUNT

The final line above is a shape description, not a promise that the literal letters ROWSxCOLSxCOUNT will be printed. On a real console, replace it with the actual dimensions reported by your machine. The fields identify the font's rows, columns and character count. This is useful for comparing two consoles or checking whether a chosen font supports the character set your display expects.

For a script, capture the command's status as well as its output:

if dimensions=$(showconsolefont -i); then
    printf 'console font dimensions: %s\n' "$dimensions"
else
    printf '%s\n' 'could not read the console font' >&2
    exit 1
fi

Do not parse a guessed table layout when the information option already provides the smaller result you need. Also do not treat an empty result as a valid dimension record just because the shell command itself was found.

5. Target a particular console

When your shell is not attached to the console of interest, pass -C followed by its pathname. This option is documented for Linux 2.6.1 and later:

$ showconsolefont -C /dev/tty1 -i
ROWSxCOLSxCOUNT

Again, the displayed line is a format illustration. The installed command prints the actual geometry on a usable console device. Use an absolute device path, and substitute the console that exists on your host:

$ ls -l /dev/tty1
$ showconsolefont -C /dev/tty1

Reading another console can require access that your ordinary account does not have. If the command reports a permissions error, first confirm the path and whether that console is active. Only then consider the least privilege mechanism approved for your host, such as an existing administrative shell. Do not add broad device permissions merely to make a diagnostic command convenient.

6. Interpret failures from the right terminal

Running this command from a pseudo-terminal may produce an error such as:

$ showconsolefont -i
Couldn't get a file descriptor referring to the console.

This means the process could not obtain a console file descriptor in that environment. It is a terminal context problem, not proof that the font table is corrupt. Retry from the local virtual console, or name a valid console with -C. The exact wording can vary with the kbd build and the underlying device state.

If an explicit target also fails, check these separately:

Do not respond by running setfont or changing boot settings. showconsolefont is an inspection command; a failed read does not authorise a configuration change. If you later decide to change a console font, treat that as a separate, potentially disruptive task and record the current configuration before doing so.

7. Use the remaining options deliberately

-v prints additional information alongside the normal diagnostic output:

$ showconsolefont -v -i

Use it when a compact command transcript is not enough. Because the manpage does not specify a stable, machine-readable verbose format, avoid building automation around individual diagnostic lines. Use -i and the exit status for a small check, and retain the complete output when investigating a host.

-V or --version prints the program version number. -C selects the console pathname, and -i suppresses the font table while reporting the dimensions. There is no font file argument in this command's documented interface. If your goal is to load or select a font, consult the separate setfont(8) workflow and its change window.

Done means