Install Ubuntu On VirtualBox-1
Install Ubuntu On VirtualBox-1
1. Introduction
Linux is an industry-standard operating system, and Ubuntu is a popular distribution of Linux.
In order to run Ubuntu as the guest operating system in a virtual machine on your host machine
(such as your Windows or Mac laptop), you can first install VirtualBox and then install Ubuntu
within VirtualBox. Then whenever you start VirtualBox, you can select Ubuntu (or any other
guest operating system that you’ve installed) to run in the virtual machine managed by
VirtualBox.
If you are on Windows 10, a better solution for getting Ubuntu is to install it directly using
the Windows Subsystem for Linux feature. For instructions, see
https://docs.microsoft.com/en-us/windows/wsl/install-win10 and the tutorial,
“Install Ubuntu on Windows 10”:
http://www.cs.sjsu.edu/~mak/tutorials/InstallUbuntuWindows.pdf.
If you are on a Macintosh platform, you do not need to install Linux, since macOS is based
on a (non-Linux) version of UNIX. The latest versions of macOS use zsh as the default shell
(command-line) language. You may want to replace it with the more popular industry-
standard bash. See the tutorial, “Install bash for macOS”:
http://www.cs.sjsu.edu/~mak/tutorials/InstallBashForMacOS.pdf
2. Hardware-assisted virtualization
To support a virtual machine, your laptop’s Intel CPU chip must have virtualization technology
(VT-x) enabled. It is enabled by default on some laptop brands, but disabled by default on
others. To see whether or not it’s enabled on your Windows laptop, follow the instructions at
https://www.intel.com/content/www/us/en/support/articles/000005486/processors.html
If VT-x is disabled, you must enable it by changing an option in the BIOS of your laptop. See
the instructions at https://www.sysprobs.com/disable-enable-virtualization-technology-bios
How to access the BIOS depends on the laptop brand: https://www.lifewire.com/bios-setup-
utilityaccess-keys-for-popular-computer-systems-2624463
Click the New button and fill in the Create Virtual Machine form . Pick an appropriate name.
Choose a machine folder on your laptop that will contain the virtual machine image. The type
should be Linux, and the version should be Ubuntu (64 bit). Set a memory size for the virtual
machine, but don’t give it more than half of the memory of your host laptop. Select the Create
a virtual hard disk now radio button.
Click the Create button.
On the Create Virtual Hard Disk form (Figure 3), specify the maximum size to which
Ubuntu’s virtual hard disk can grow. Select the VDI (VirtualBox Disk Image) and the
Dynamically allocated radio buttons. Click the Create button. This creates the new virtual
machine named, ubuntu.
Note: For an installation of Ubuntu, specify at least 64 GB for the size of the virtual hard disk.
Select the name of the newly created virtual machine. Click the Settings icon at the top. Then
click on System in the left panel. In the System Settings form, select the Motherboard tab.
Specify the amount of base memory you want to devote the virtual machine, but not more than
half of the physical memory in your host machine. Select the Processor tab and specify the
number of CPUs you want to devote to the virtual machine, but not more than half the number
of CPUs in your host machine. Click the OK button.
Note: For an installation of Ubuntu, specify at least 2 CPUs and 4 GB of memory.
Click Storage in the left panel. The Storage Settings form shows the virtual CD ROM drive,
which is initially empty, and the virtual hard drive, which is the .vdi virtual disk image that
VirtualBox created. Select Empty under Controller: IDE.
You want to install Ubuntu on the virtual machine, so you must “insert” the .iso installation disk
image file that you downloaded earlier into the virtual CD ROM drive. Look under Attributes
and click on the image of the disk to the right of the dropdown menu. Select the .iso file to
insert into the drive. You should now see the .iso file name under Controller: IDE. Click the OK
button.
5. Install Ubuntu
Now you are ready to start the virtual machine (Figure 8) in order to install Ubuntu. To start the
Ubuntu virtual machine, highlight it and click the Start button at the top.
The virtual machine will boot off the installation disk and start the installation process. Because
the installation process downloads files from the Internet, you will need a good connection.
Choose your language and click Install Ubuntu to start the installation process. At various times,
you will be asked to make a choice. Except otherwise directed, you should accept the default
choices.
On the Installation type form, accept the choice Erase disk and install Ubuntu. The disk that it
will erase is the virtual disk, not your host laptop’s physical disk! Click the Install Now button
and the subsequent Continue button.
On the Who are you? form, enter appropriate names. The username will also become the name
of your home directory in /home. The passwords will become your login passwords.
The installation process will take a while, especially if you have a slow Internet connection.
You can watch files download and install, or you can go have a cup of coffee. When it’s finally
done, it will ask you to restart. Press the Restart Now button.