Centos – Increasing Command Line Resolution Centos 6.4 VirtualBox

centosvirtualbox

I running CentOS 6.4 in just CLI mode. However, I have a 1080 monitor and the resolution from the CLI interface is horrible. Do I still have to install Guest Additions in order to increase display resolution.

Best Answer

2.6.X kernels

You can increase the resolution at the console like so via your /etc/grub.conf file. Find the kernel ... line pertaining to your system booting up:

kernel /vmlinuz-2.6.32-358.11.1.el6.x86_64 ro 
        root=/dev/mapper/vg_mungr-lv_root rd_LVM_LV=vg_mungr/lv_root 
        rd_LVM_LV=vg_mungr/lv_swap rd_NO_LUKS rd_NO_MD 
        rd_NO_DM LANG=en_US.UTF-8 
        SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us 
        console=ttyS0,115200 crashkernel=auto vga=791

Where some of the values you can use for vga=:

  • 791 - 1024x768, 16 bit
  • 792 - 1024x768, 24 bit
  • 794 - 1280x1024, 16 bit
  • 795 - 1280x1024, 24 bit

Newer kernels (3.x)

As you move forward to newer versions of the Linux kernel that make use of KMS you'll need to change from using vga=, so you'll need to pay particular attention to what version of the kernel you're using. You can read more about it in this U&L Q&A titled: How to set the resolution in text consoles (troubleshoot when any vga=… fails).

References