Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set a custom font on my virtual console (vt1) using the following command:

shell> setfont ter-114f

If I switch to X (using Ctrl+Alt+F7) and come back to the virtual console (using Ctrl+Alt+F1), the display isn't proper. Looks like the screen size is getting reset (previously set to 28 rows before switching).

How can this be fixed?

share|improve this question

migrated from stackoverflow.com May 9 '11 at 11:13

This question came from our site for professional and enthusiast programmers.

It depends on your distribution.

Arch Linux

In Arch Linux, once you have selected the font from /usr/share/kbd/keymaps/ that you would like to set, you need to add it to your /etc/rc.conf like so:


and then add the consolefont hook to your /etc/mkinitcpio.conf

HOOKS="base udev autodetect pata scsi sata filesystems consolefont"

and regenerate the image:

# mkinitcpio -p kernel26


In Ubuntu/Debian, select your font from /usr/share/consolefonts/ and then edit /etc/default/console-setup and add an entry like:


and to make it permanent:

sudo dpkg-reconfigure console-setup


The available fonts are listed in /lib/kbd/consolefonts/.

Specify the desired font in /etc/sysconfig/i18n file by modifying the SYSCONF entry.



  1. Arch: https://wiki.archlinux.org/index.php/Fonts#Console_fonts
  2. Fedora: http://www.g-loaded.eu/2005/09/30/change-console-font-in-fedora
share|improve this answer

Often the X server will save the old video state when it starts, and restore that when switching back to the text console. If you change the text console video state in between, it will get clobbered. Maybe KMS (kernel mode setting) will fix this?

share|improve this answer

It's enough to copy your font in ~/.fonts or /usr/share/fonts. Carefully, /usr/share/fonts has some dir, please read them. Then for ~/.fonst run :

fc-cache -v -f #with your username 

And for /usr/share/fonts run :

fc-cache -v -f #with superuser
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.