Jun 30, 2023 2 min read

Changing the Resolution and Font Type in Debian Server

Changing the Resolution and Font Type in Debian Server

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/grub file. Change this line:

to this:

  • Now, add this line:
You might also choose 1920x1080, or another resolution, if you wish!
  • 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 reboot command.

That's it. Now, instead of some old-school 640 x 480 resolution, you should be running at 1280 x 720.

There are other resolution options as well. To find out what they are, reboot the system and access the GRUB area by pressing c immediately after the system boots. Type set pager=1 so 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:

dpkg-reconfigure console-setup

That will open console-setup and you can select your favorite font.

  • For encoding, leave it as UTF-8 and tab down to OK and press Enter.
  • 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.

The process for modifying the resolution is similar on Fedora-based server systems, but you need to run grub2-mkconfig to update the GRUB bootloader. Once done, that should display a decent font size without any further configuration required.
That's it. I hope that helps anyone who has been straining their eyes when working with Debian server!
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Prowse Tech.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.