How to use ubuntu server full screen in virtualbox?

You can have the ubuntu server console in VirtualBox start at a resolution that your graphic card supports via the virtualbox environment.

Quick Steps

  • Check the resolutions your graphic card supports via the VirtualBox Environment (VBE).You should be able to find that out by issuing the command 'vbeinfo' in the GRUB console (hit the C key when the GRUB boot menu shows up).

  • Pick one resolution, then open '/etc/default/grub' (e.g. sudo vim /etc/default/grub) and change the line #GRUB_GFXMODE=640x480 to something like this GRUB_GFXMODE=1152x864 (where 1152x864 should be your custom resolution which is also supported by your graphic card).

  • Now run these two commands one-by-one:

    sudo update-grub
    sudo reboot
    

You should now see your VM's console in the custom resolution that you just set.

(PS: As Javier Rivera said, full screen resolution may not be possible.)


As mentioned in Proper way to change terminal resolution in Ubuntu Server 13.04? you also need to set

GRUB_GFXPAYLOAD_LINUX=keep

in the /etc/default/grub file otherwise the resolution is only briefly used during boot


Other answers didn't work properly for me on Ubuntu 16.10 - e.g. resolution would be applied, but then reverted at various points later during boot. What did eventually work was the combination of the following three settings in /etc/default/grub:

GRUB_GFXMODE=1280x1024  # width x height required - see below
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
GRUB_GFXPAYLOAD_LINUX=keep

Followed by running:

sudo update-grub
sudo reboot

NOTE 1: Supported resolutions can be identified from within grub. Hit C at the grub prompt, then type:

set pager=1    (To enable paging of long vbeinfo output)
vbeinfo
reboot         (When done)

When selecting a resolution, width x height is sufficient (unless you specifically care about setting colour depth too).

Note 2: If you don't see the GRUB menu, hold Shift while booting.


What I always do is install ssh on the server and then use putty to access the server. Not only does this allow me to view the server in full screen, it also allows me to connect to it from other machines.

to install ssh metapackage (client and server) just run:

sudo apt-get install ssh

You could install only openssh-server if you don't need the ssh client on the VM.