Problem: When you install Debian as a server, the initial resolution and font type leave something to be desired.
Here's an example shown in a virtual machine running Debian 12:
That'll make your eyes go berserk after a while. This can be the case whether you are working with a real physical server or a virtual machine.
Solution: Modify the resolution and the font type/size. Here's how to do it:
Change the resolution
- As root, open the
/etc/default/grubfile. Change this line:
- Now, add this line:
- Update the GRUB bootloader. Run the following command:
Make sure that it takes effect. You may have to run it twice.
- Reboot the system with the
That's it. Now, instead of some old-school 640 x 480 resolution, you should be running at 1280 x 720.
cimmediately after the system boots. Type
set pager=1so that you can view results in the GRUB console one page at a time. Then type
vbeinfo. This will show all the resolutions that the system supports.
Change the Font Type
Type the command:
That will open console-setup and you can select your favorite font.
- For encoding, leave it as UTF-8 and tab down to
- For the character set, leave it as the default (for me it was Latin1 and Latin5).
- For the font, consider TerminusBold or Terminus.
- Finally, for the font size, consider 10x20 or 11x22.
For my example, I chose TerminusBold and 11x22. Take a look at the results. Click the image to enlarge.
Much BETTER! Now we can actually read the screen. On a physical server, I might go with a bit smaller font size, or perhaps use a larger resolution and a bigger font. It all depends on the video card the server has and the monitor that it is connected to. But most of the time, I make this configuration change on virtual machines.
grub2-mkconfigto update the GRUB bootloader. Once done, that should display a decent font size without any further configuration required.