Changing Screen Resolution in Ubuntu 18.04 using Hyper-V

After initially setting up your Ubuntu virtual machine in Hyper-V, you may note that the default resolution is 1152×864 (4:3). This is fine if you just plan on using Ubuntu for short periods, but in this day and age of having high resolution displays, the more screen real estate you can use, the better. This tutorial will demonstrate how to change your resolution in Ubuntu using the Terminal.

The Terminal can be a bit daunting, especially if you are not used to using it, but it allows you more control over what you can have the computer do or accomplish. With this step by step tutorial, you will be able to change your resolution using the Terminal to your preferred one.

To open the Terminal, you can either use the command shortcut Ctrl + Alt + T or accessing it through the Show Applications icon on the bottom left of the screen, and scrolling to Terminal or searching for it in the search bar at the top:


Once opened, you will see the Terminal prompt be displayed:

Click inside the Terminal and type sudo vi /etc/default/grub. You may be prompted for your password:

The prompt will change and display the contents of the file using the vi text editor. Look for the line that states GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” It will be the 5th line entry from the GRUB_DEFAULT=0 as shown below:

In the GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” you will add video=hyperv_fb: 1920×1280 by using the arrow keys on your keyboard to navigate to the corresponding section. In order to edit the file needed, click i on your keyboard. Once done click ESC and type :wq to write and quit vi. The line that was changed should look like this after the appropriate edit:  GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash video=hyperv_1920x1080”. You can add your corresponding resolution instead of 1920×1080.

Once the changes have been saved and made, run sudo update-grub to update grub.

Once the update has completed, restart your virtual machine and your changes should take effect upon start up and show your virtual machine using the resolution you entered.