After installing Ubuntu in VirtualBox and log in to the Ubuntu OS, I find the ubuntu os screen resolution is configured at 800*600, this is not a good screen resolution for usage. I want to change it to at least 1920*1080. After investigate I finally find the method to change it.
1. Change Ubuntu OS Screen Resolution Steps.
- Start ubuntu os, click Show Applications icon at bottom left corner.
- Click the Settings icon in the applications panel.
- Click Devices —> Displays menu item. Then you can see the default screen resolution is 800*600 on the window right side Resolution section.
- If you change the screen resolution here, you will find the change does not take effect.
- You need first to follow the section Enable Copy & Paste Between Host (Local Machine) And Guest (Virtual Machine) OS in the article How To Install Ubuntu On Virtualbox Mac.
- Then in the ubuntu os, click Show Applications again, input terminal in the search box, and open a terminal.
- Then run the command $ sudo apt-get install virtualbox-guest-dkms in the terminal to install the dkms packages. You will get the below output, after the software installation, you can change the screen resolution as you like.
jerry@jerry-VirtualBox:~$ sudo apt-get install virtualbox-guest-dkms [sudo] password for jerry: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: build-essential dkms dpkg-dev fakeroot g++ g++-7 gcc gcc-7 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libdpkg-perl libfakeroot libgcc-7-dev libitm1 liblsan0 libmpx2 libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev make manpages-dev Suggested packages: menu debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg gcc-multilib autoconf automake libtool flex bison gcc-doc gcc-7-multilib gcc-7-locales libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc git bzr libstdc++-7-doc make-doc The following NEW packages will be installed: build-essential dkms dpkg-dev fakeroot g++ g++-7 gcc gcc-7 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libfakeroot libgcc-7-dev libitm1 liblsan0 libmpx2 libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev make manpages-dev virtualbox-guest-dkms The following packages will be upgraded: libdpkg-perl 1 upgraded, 29 newly installed, 0 to remove and 278 not upgraded. Need to get 27.7 MB of archives. After this operation, 124 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libc-dev-bin amd64 2.27-3ubuntu1 [71.8 kB] Get:2 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-76.86 [999 kB] Get:3 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dev amd64 2.27-3ubuntu1 [2,587 kB] Get:3 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dev amd64 2.27-3ubuntu1 [2,587 kB] Get:3 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dev amd64 2.27-3ubuntu1 [2,587 kB] Get:4 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libitm1 amd64 8.3.0-6ubuntu1~18.04.1 [28.0 kB] Get:5 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libatomic1 amd64 8.3.0-6ubuntu1~18.04.1 [9,184 B] Get:6 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasan4 amd64 7.4.0-1ubuntu1~18.04.1 [359 kB] Get:7 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblsan0 amd64 8.3.0-6ubuntu1~18.04.1 [133 kB] Get:8 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtsan0 amd64 8.3.0-6ubuntu1~18.04.1 [288 kB] Get:9 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libubsan0 amd64 7.4.0-1ubuntu1~18.04.1 [126 kB] Get:10 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcilkrts5 amd64 7.4.0-1ubuntu1~18.04.1 [42.5 kB] Get:11 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmpx2 amd64 8.3.0-6ubuntu1~18.04.1 [11.6 kB] Get:12 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libquadmath0 amd64 8.3.0-6ubuntu1~18.04.1 [133 kB] Get:13 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-7-dev amd64 7.4.0-1ubuntu1~18.04.1 [2,381 kB] Get:14 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.4.0-1ubuntu1~18.04.1 [7,463 kB] Get:15 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc amd64 4:7.4.0-1ubuntu2.3 [5,184 B] Get:16 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++-7-dev amd64 7.4.0-1ubuntu1~18.04.1 [1,468 kB] Get:17 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++-7 amd64 7.4.0-1ubuntu1~18.04.1 [7,574 kB] Get:18 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++ amd64 4:7.4.0-1ubuntu2.3 [1,568 B] Get:19 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 make amd64 4.1-9.1ubuntu1 [154 kB] Get:19 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 make amd64 4.1-9.1ubuntu1 [154 kB] Get:20 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdpkg-perl all 1.19.0.5ubuntu2.3 [211 kB] Get:21 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 dpkg-dev all 1.19.0.5ubuntu2.3 [607 kB] Get:22 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 build-essential amd64 12.4ubuntu1 [4,758 B] Get:23 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 dkms all 2.3-3ubuntu9.7 [68.1 kB] Get:24 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libfakeroot amd64 1.22-2ubuntu1 [25.9 kB] Get:25 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 fakeroot amd64 1.22-2ubuntu1 [62.3 kB] Get:26 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB] Get:27 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-xs-perl amd64 0.04-5 [11.1 kB] Get:28 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB] Get:29 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 manpages-dev all 4.15-1 [2,217 kB] Get:30 http://cn.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 virtualbox-guest-dkms all 5.2.34-dfsg-0~ubuntu18.04.1 [586 kB] Fetched 25.3 MB in 4min 12s (100 kB/s) Selecting previously unselected package libc-dev-bin. (Reading database ... 126228 files and directories currently installed.) Preparing to unpack .../00-libc-dev-bin_2.27-3ubuntu1_amd64.deb ... Unpacking libc-dev-bin (2.27-3ubuntu1) ... Selecting previously unselected package linux-libc-dev:amd64. Preparing to unpack .../01-linux-libc-dev_4.15.0-76.86_amd64.deb ... Unpacking linux-libc-dev:amd64 (4.15.0-76.86) ... Selecting previously unselected package libc6-dev:amd64. Preparing to unpack .../02-libc6-dev_2.27-3ubuntu1_amd64.deb ... Unpacking libc6-dev:amd64 (2.27-3ubuntu1) ... Selecting previously unselected package libitm1:amd64. Preparing to unpack .../03-libitm1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libatomic1:amd64. Preparing to unpack .../04-libatomic1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libasan4:amd64. Preparing to unpack .../05-libasan4_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package liblsan0:amd64. Preparing to unpack .../06-liblsan0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libtsan0:amd64. Preparing to unpack .../07-libtsan0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libubsan0:amd64. Preparing to unpack .../08-libubsan0_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libcilkrts5:amd64. Preparing to unpack .../09-libcilkrts5_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libmpx2:amd64. Preparing to unpack .../10-libmpx2_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libquadmath0:amd64. Preparing to unpack .../11-libquadmath0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libgcc-7-dev:amd64. Preparing to unpack .../12-libgcc-7-dev_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package gcc-7. Preparing to unpack .../13-gcc-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package gcc. Preparing to unpack .../14-gcc_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking gcc (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libstdc++-7-dev:amd64. Preparing to unpack .../15-libstdc++-7-dev_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package g++-7. Preparing to unpack .../16-g++-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking g++-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package g++. Preparing to unpack .../17-g++_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking g++ (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package make. Preparing to unpack .../18-make_4.1-9.1ubuntu1_amd64.deb ... Unpacking make (4.1-9.1ubuntu1) ... Preparing to unpack .../19-libdpkg-perl_1.19.0.5ubuntu2.3_all.deb ... Unpacking libdpkg-perl (1.19.0.5ubuntu2.3) over (1.19.0.5ubuntu2.1) ... Selecting previously unselected package dpkg-dev. Preparing to unpack .../20-dpkg-dev_1.19.0.5ubuntu2.3_all.deb ... Unpacking dpkg-dev (1.19.0.5ubuntu2.3) ... Selecting previously unselected package build-essential. Preparing to unpack .../21-build-essential_12.4ubuntu1_amd64.deb ... Unpacking build-essential (12.4ubuntu1) ... Selecting previously unselected package dkms. Preparing to unpack .../22-dkms_2.3-3ubuntu9.7_all.deb ... Unpacking dkms (2.3-3ubuntu9.7) ... Selecting previously unselected package libfakeroot:amd64. Preparing to unpack .../23-libfakeroot_1.22-2ubuntu1_amd64.deb ... Unpacking libfakeroot:amd64 (1.22-2ubuntu1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../24-fakeroot_1.22-2ubuntu1_amd64.deb ... Unpacking fakeroot (1.22-2ubuntu1) ... Selecting previously unselected package libalgorithm-diff-perl. Preparing to unpack .../25-libalgorithm-diff-perl_1.19.03-1_all.deb ... Unpacking libalgorithm-diff-perl (1.19.03-1) ... Selecting previously unselected package libalgorithm-diff-xs-perl. Preparing to unpack .../26-libalgorithm-diff-xs-perl_0.04-5_amd64.deb ... Unpacking libalgorithm-diff-xs-perl (0.04-5) ... Selecting previously unselected package libalgorithm-merge-perl. Preparing to unpack .../27-libalgorithm-merge-perl_0.08-3_all.deb ... Unpacking libalgorithm-merge-perl (0.08-3) ... Selecting previously unselected package manpages-dev. Preparing to unpack .../28-manpages-dev_4.15-1_all.deb ... Unpacking manpages-dev (4.15-1) ... Selecting previously unselected package virtualbox-guest-dkms. Preparing to unpack .../29-virtualbox-guest-dkms_5.2.34-dfsg-0~ubuntu18.04.1_all.deb ... Unpacking virtualbox-guest-dkms (5.2.34-dfsg-0~ubuntu18.04.1) ... Setting up libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up make (4.1-9.1ubuntu1) ... Setting up libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up linux-libc-dev:amd64 (4.15.0-76.86) ... Setting up libdpkg-perl (1.19.0.5ubuntu2.3) ... Setting up liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up dpkg-dev (1.19.0.5ubuntu2.3) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libfakeroot:amd64 (1.22-2ubuntu1) ... Setting up libalgorithm-diff-perl (1.19.03-1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Setting up libc-dev-bin (2.27-3ubuntu1) ... Setting up manpages-dev (4.15-1) ... Setting up libc6-dev:amd64 (2.27-3ubuntu1) ... Setting up libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up fakeroot (1.22-2ubuntu1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode Setting up libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libalgorithm-merge-perl (0.08-3) ... Setting up libalgorithm-diff-xs-perl (0.04-5) ... Setting up gcc-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up g++-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up gcc (4:7.4.0-1ubuntu2.3) ... Setting up dkms (2.3-3ubuntu9.7) ... Setting up g++ (4:7.4.0-1ubuntu2.3) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.4ubuntu1) ... Setting up virtualbox-guest-dkms (5.2.34-dfsg-0~ubuntu18.04.1) ... Loading new virtualbox-guest-5.2.34 DKMS files... Building for 5.0.0-23-generic Building initial module for 5.0.0-23-generic Done. vboxguest: Running module version sanity check. Error! Module version 5.2.34_Ubuntu for vboxguest.ko is not newer than what is already found in kernel 5.0.0-23-generic (6.0.6_KernelUbuntu). You may override by specifying --force. vboxsf.ko: Running module version sanity check. Error! Module version 5.2.34_Ubuntu for vboxsf.ko is not newer than what is already found in kernel 5.0.0-23-generic (6.0.6_KernelUbuntu). You may override by specifying --force. vboxvideo.ko: Running module version sanity check. - Original module - Installation - Installing to /lib/modules/5.0.0-23-generic/updates/dkms/ depmod... DKMS: install completed. Processing triggers for libc-bin (2.27-3ubuntu1) ...