Facing an issue with how to change the screen resolution for your newly setup Ubuntu server box? Here is the simple guide on how to change the screen resolution.
The following table lists some of the available VGA codes for changing of screen resolution purposes.
VGA Resolution Codes for GRUB & Lilo
Depth | 640×480 | 800×600 | 1024×768 | 1152×864 | 1280×800 | 1280×1024 | 1440×900 | 1600×1200 |
8 | 769 | 771 | 773 | 353 | 864 | 775 | 868 | 796 |
16 | 785 | 788 | 791 | 355 | ??? | 794 | ??? | 798 |
32 | 786 | 789 | 792 | ??? | 865 | ??? | 869 | ??? |
To change the screen resolution, let’s start by updating the grub file.
sudo nano /etc/default/grub
sudo vi /etc/default/grub
Look for the line of CRUB_CMDLINE_LINUX=. To set the screen resolution to 800×600 for 8 bits of color depth, we will need to enter vga code 771 as the following.
CRUB_CMDLINE_LINUX="vga=771"
Save the changes to the file. Then, run the following command to update the grub.
sudo update-grub
Restart the system now and you should observe that the screen resolution has changed.
sudo shutdown -r now
Changing Screen Resolution in Ubuntu Server