I have a Unix-like OS installed without desktop. Is it possible to change the font of the terminal?
If you use the Linux console, the best way I found is:
put, for example
CHARMAP="UTF-8" CODESET="Lat7" FONTFACE="Terminus" FONTSIZE="28x14"
This works for my Debian; it may be different for you.
In Debian, you can also run
dpkg-reconfigure -plow console-setup to be prompted for the various console settings and pick them from menus.
Edit - I put together a small page how to setup the font colors. The section that is relevant for this post has the header "the Linux VTs" (= ttys, or "console").
If you want to use nearly any X-compatible font you should have a look at David Herrman's work on
kmscon. The name slightly belies the project, actually, as Kernel Mode Setting is not a requirement for it to work - it also works with with frame-buffer devices - for instance if you are using proprietary AMD or nvidia display drivers. With
kmscon you get multi-seat session management,
xterm like keyboard and UTF-8 font handling and session control. Changing the font can be done via the
/etc/kmscon/kmscon.conf or via a command-line option.
/etc/default/console-setup et al. have been superseded on systemd operating systems, although you will find that some operating systems such as Debian try to maintain the older configuration system.
The way to do this on a systemd operating system is to edit the font settings in the
/etc/vconsole.conf file. These settings are applied by the
systemd-vconsole-setup service, which is essentially a glorified way of running
loadkeys before the login services are brought up.
So you would have
FONT=Uni2-Terminus28x14 in that file, for example.
Note that the service program allows kernel command-line options such as
vconsole.font to override
/etc/vconsole.conf contents. If you are mucking around with GRUB kernel command-line options, bear this in mind.
- Lennart Poettering et al..
vconsole.conf. systemd manual pages. FreeDesktop.org.
- Lennart Poettering et al..
systemd-vconsole-setup. systemd manual pages. FreeDesktop.org.
- Setting console font in vconsole.conf does not work (systemd)
Using Ubuntu 16.04 (probably works in all supported versions), I edited
~/.bashrc and just before terminal splash at end of file, inserted the
# Set font when running in console /bin/setfont /usr/share/consolefonts/Lat2-Terminus32x16.psf.gz # Splash Calendar and time now # ASCII Linux distribution display screenfetch
Now when selected Ctrl+Alt+F1 through Ctrl+Alt+F6 and get nice big fonts.
This is the largest font available and you can see a complete list with
$ ls /usr/share/consolefonts Arabic-Fixed15.psf.gz Lat15-Terminus20x10.psf.gz Arabic-Fixed16.psf.gz Lat15-Terminus22x11.psf.gz Arabic-VGA14.psf.gz Lat15-Terminus24x12.psf.gz (... SNIP ...) Lat15-Terminus14.psf.gz Vietnamese-Fixed16.psf.gz Lat15-Terminus16.psf.gz Vietnamese-Fixed18.psf.gz
This is a facsimile, not a true screen capture from console where screen is wider by 20% and background is black:
Prior to changes I couldn't read the screen on HDPI monitor.
In Linux Mint 18.1 terminal:
- Right click anywhere in the black space.
- Choose "profiles", "profile preferences".
- Put a tic in "custom font" box.
- Click on the big text sample box next to it.
- Choose whatever font size and type you want.
The changes will appear immediately.