Adjust TTY (Text Console/Terminal) Resolution for GRUB and Linux

Most modern linux distributions will attempt to set the text console (for historical reasons also referred to as TTY, for TeleTYpewriter) resolution to the primary display's maximum native resolution. You may find this is not the case on your system, or more commonly these days, that the virtual display resolution of your virtual machine is undesirable. Personally I most commonly find this to be a problem when working on virtual machines through the Citrix Hypervisor XenCenter client software; when using a smaller resolution on the client machine it is necessary to constantly scroll the Console tab/undocked window up and down or scale the display which results in degraded image quality.

In ye olden days one would set the resolution using a code and the vga= kernel command line option. You can still do that however if you are booting with GRUB you can set the gfxpayload environment variable with a human-readable resolution and both grub and the kernel will run a the specified resolution.

The following edits are made to the /etc/default/grub configuration file. GRUB configuration has become complicated over the years so this meta-configuration composed of variables was introduced as an alternative to directly editing the file actually used by the bootloader directly. Among other things it allows one to specify settings that persist and are applied to multiple boot options. Since kernel upgrades and the like may overwrite that file (depending on your distribution) it's best to play ball with this system. After making your edits make sure /boot is mounted read-write if it is on another partition and run your distribution's GRUB update script (common syntax below) as root to effect the changes to the active GRUB configuration file.

If you choose to do it the old way add your vga= line to GRUB_CMDLINE_LINUX_DEFAULT; if there are already options contained in this string append it with a space. The VGA codes are such:

Colour bits Colours 640×480 800×600 1024×768 1280×1024 1400×1050 1600×1200
8 bits 256 colors 769 771 773 775
15 bits 32,768 colors 784 787 790 793
16 bits 65,536 colors 785 788 791 794 834 884
24 bits 16,777,216 colors 786 789 792 795

In my case, I would like the console to be a manageable 800x600 with 24-bit colour. My vga option would look like: vga=789.

We can determine the video modes supported by GRUB by interrupting the boot menu and entering the GRUB command line on startup. Press the c key to enter the command line.

grub> set pager=1 grub> vbeinfo

This will display a table of supported resolutions. Back in /etc/default/grub we want to make sure the linux kernel inherits GRUB's resolution and doesn't try to do its own thing. We're going to add the nomodeset option instead of vga= to the kernel command line and specify GRUB's resolution in GRUB_GFXPAYLOAD_LINUX. Try to find these variables, they should already exist. If they do not, create them:


Now to update the active configuration file, depending on your system, run:

update-grub grub-update grub-mkconfig -o /boot/grub/grub.cfg grub2-mkconfig -o /boot/grub2/grub.cfg

Favourite RHEL/CentOS Packages

I frequently start a fresh install with the minimal distribution. This makes for a lean, space-efficient virtual machine but leaves a number of tools missing. This page serves as a (living/in progress) quick list of all the software I like to install as soon as a new environment is running so I don't have to reach for it later, in an emergency.

If you choose a different preconfiguration of packages (i.e. Server instead of Minimal) some of these tools will already be available, but it doesn't hurt to bundle them all on the same CLI.

Some of these packages will require enabling the Extra Packages for Enterprise Linux repos and you will probably end up needing them anyway:

dnf install epel-release

  • nano
  • net-misc
  • psmisc
  • nmap
  • screen
  • mlocate
  • youtube-dl

Text-based browsers elinks, links and lynx now require enabling the PowerTools repository:
dnf --enablerepo=PowerTools install elinks links lynx

Favourite Windows Software

This page serves as a living, in-progress dumping ground for direct links to the download pages of my favourite Windows software so I don't need to waste time finding them when I perform a new installation. You may find it useful too. If you have any suggestions please let me know.


This is a set of software I like to install on any new Windows installation, Virtual Machine or desktop.

On a Virtual Machine

Nothing here yet...

On a Server

Nothing here yet...

On a Workstation

Nothing here yet...

On an End User Terminal

Nothing here yet...

In a UNIX-like Environment

  • Cygwin NOTE: Cygwin can consume huge amounts of space. From Stack Overflow: What is the current full install size of Cygwin? by user Warren Young:

    A full Cygwin installation can range from 23 to 112 GiB, depending on how you define "full."


    I've come up with a simple set of package exclusion rules that results in a much smaller installation:

    1. Skip all of the -debuginfo packages. Few people need these, and they take up a lot of space. Savings: about 53 GiB in the installation tree alone; more in the download tree.

      It's easy to apply this rule. After selecting all packages for installation with the sneaky trick above but before you move on to the next screen, click the "Install" text next to the "Debug" category header until it switches back to "Default."

      If you've already installed the debug packages, click that text until it says "Uninstall" instead.

    2. Do not explicitly install any of the lib* packages. Let Cygwin's setup-*.exe automatically install libraries to satisfy package dependencies. Savings: about 5 GiB ⁵

      To apply this rule, switch the "Libs" category to "Default" or "Uninstall" as you did with the "Debug" category. The installer will figure out which libraries you actually need in a later step.

    3. Skip the cross-compilers and associated packages. Again, few people need these.⁶ Savings: About 4 GiB

      There are two major sets of cross-development tools in Cygwin: the set for creating Cygwin executables of the other word size (i.e. 64-bit tools and libraries for 32-bit Cygwin, or vice versa) and the set for building MinGW executables of the same word size as your Cygwin installation.

      To apply this rule for a 64-bit Cygwin installation, while still on the "Select Packages" screen, type cygwin32- in the package name search box at the top of that screen, then click the Default text next to each top-level category until it cycles to Default or Uninstall, as above.

      Repeat that for mingw64-.

      The idea is the same for 32-bit Cygwin, except that you search for and exclude packages with cygwin64- and mingw32- in their names instead.

    By following this rule set, I was able to install nearly everything, taking only about 23 GiB.


    We can get the installation to be even smaller by excluding several other notorious disk hogs:

    • X11, the desktop environments, and the GUI apps together require about 11 GiB.⁷
    • A Cygwin Base + Devel installation comes to about 10 GiB.
    • A Cygwin Base + TeX category installation takes about 5 GiB. If you install only your native language's support package, it comes to about 3.7 GiB instead.
    • All of the -doc packages combined chew up about 5 GiB of disk space.

    You really should read the original post if you intend to install Cygwin, it's extraordinarily detailed. Hats off to Mr. Young for the hands-down best answer I have ever seen posted to Stack Overflow.

Additional Links

Untested Software Recommended by Others

How to Install screen on RHEL/CentOS 8

screen was included in the default repositories distributed with RHEL/CentOS 7 and earlier. Since RHEL/CentOS 8 it is now necessary to configure the Extra Packages for Enterprise Linux (EPEL) repos, which you're probably going to need eventually anyway.

dnf install epel-release

Now you can install screen as usual:

dnf install screen