layout | title | parent | nav_order |
---|---|---|---|
default |
Using Ubuntu through a Virtual Machine |
1. General guides |
3 |
Ubuntu is a Linux operating system that is widely used for bioinformatics. If you have not used a Linux system before, an Ubuntu virtual machine is an ideal way to try the programs documented on this website.
A virtual machine is a computer file, typically called an image, that behaves like an actual computer. It acts as a computer within a computer. Virtual machines run in a window, much like any other program running in a window on your computer. The virtual machine is sequestered from the rest of the system, meaning that the software inside a virtual machine can not tamper with the computer itself. This produces an ideal environment for testing other operating systems, and running software or applications on operating systems they were not originally intended for.
An Ubuntu virtual machine can be created using VirtualBox, and an Ubuntu disk image. VirtualBox is a program that can be used to create, manage, and access virtual machines. A disk image is a file that acts like a compact disc, or another storage device. VirtualBox and the Ubuntu disk image are freely available online.
- Files required to set up an Ubuntu virtual machine
- How to create an Ubuntu virtual machine using VirtualBox
- Increasing the screen resolution of the Ubuntu virtual machine
- See also
- References
To set up an Ubuntu virtual machine, you will need an Ubuntu disk image, a file to install VirtualBox, and the VirtualBox Extension Package. This requires around 13 GB of free hard drive space on your computer in total. The Ubuntu disk image is around 2 GB in size, and may take a while to download depending on your internet connection. The file required to install VirtualBox is around 108 or 123 MB in size, depending on the platform of your computer (i.e. Windows or Mac).
- The Ubuntu disk image (filename:
ubuntu-18.04.4-desktop-amd64.iso
) - VirtualBox installer for Windows
- VirtualBox installer for Mac
- VirtualBox Extension Pack (all platforms)
If the above links do not work, they may have expired. In this case, the above files can be found on the VirtualBox website and the Ubuntu website.
- Download the VirtualBox installer for your computer (either Windows or Mac).
- Once the VirtualBox installer is downloaded, open it and follow the on-screen instructions to install the VirtualBox program.
- Windows only: If you get a "Windows Security" prompt asking "Would you like to install this device software?" for driver software from "Publisher: Oracle Corporation", select "Install".
- Mac only: If you get a "This package will run a program to determine if the software can be installed" prompt while installing VirtualBox, select "Continue". You may also be asked to enter your user password while installing VirtualBox on a Mac.
- Once installed, open the VirtualBox program.
- In VirtualBox, click on "New" (the blue badge). This will open a menu to create a new virtual machine.
- In the "Name" field of the "Name and operating system" window, type "ubuntu". VirtualBox will automatically set the type and version for this virtual machine as "Linux" and "Ubuntu".
- Select "Next" to proceed to the "Memory size" section.
- In this section, you can set the amount of Random Access Memory (RAM) that the virtual machine can use. A suggested amount of RAM will automatically be selected when you get to this page, but you can increase the amount of RAM allocated using the slider on this page.
- Note: If you use the slider to increase the amount of RAM allocated on the "Memory Size" page, keep the slider in the green zone. Setting the slider in the orange or red zone (>50% of your computer's available RAM) will negatively affect the performance of the virtual machine.
- Select "Next" to proceed to the "Hard disk" page.
- Select "Create a virtual hard disk now", and then select "Create".
- On the "Hard disk file type" page, select "VDI (VirtualBox Disk Image)", and then select "Next".
- On the "Store on physical hard disk", select "Dynamically allocated", and then select "Next" to proceed to the "File location and size" page.
- On this page, you can change the location and size of the virtual hard disk. There is no need to adjust the size of the virtual hard disk, but take note of its location (the folder/directory it will be created in). Select "Create".
- In the left side of the VirtualBox main menu, double-click the name of the virtual machine you just created ("ubuntu").
- This will bring up the "Select start-up disk" window. In this window, select the folder icon to open the "Optical Disk Selector" menu.
- In this menu, select "Add", which will open a window titled "Please choose a virtual optical disk file".
- In this window, go to the folder into which the Ubuntu disk image downloaded (e.g. "Downloads"), and click the Ubuntu disk image (filename:
ubuntu-18.04.4-desktop-amd64.iso
) to select it, and then select "Open". - This will bring you back to the "Optical Disk Selector" window. Select the Ubuntu disk image you selected in the previous window, and click on "Choose".
- This will bring you back to the "Select start-up disk" window. The Ubuntu disk image should be selected in the drop down menu (this read "Empty" before the Ubuntu disk image was added). Select "Start" to start the virtual machine.
- The Ubuntu virtual machine is now running in its own window. It may take a few minutes to start up the first time.
- On the "Welcome" screen in Ubuntu, select "Install Ubuntu".
- In the "Keyboard layout" section, select your keyboard layout, and then select "Continue". This will bring you to the "Updates and other software" window.
- In this window, in the section "What apps would you like to install to start with?", select "Minimal installation".
- In the "Other options" section, select "Download updates while installing Ubuntu", and leave "Install third-party software..." unselected. Select "Continue" to proceed to the "Installation type" window.
- In this window, select "Erase disk and install Ubuntu". As this is a virtual machine, in this instance "disk" refers to the virtual disk image (
.vdi
) file created earlier (see steps 12 to 15). Select "Install now". - A window titled "Write the changes to disks?" will appear. In this window, select "Continue".
- This will bring you to the "Where are you?" window. In this window, enter your location (which is needed to set the system clock) and select "Continue".
- Fill in the requested details in the "Who are you?" window: your name, your computer's name, your username (both of which will be filled in automatically when you enter your name), and your password. Make sure you remember your password, you will need it to install programs in your Ubuntu virtual machine. Select "Continue" to proceed.
- At this point, Ubuntu will begin installing on the virtual disk image created earlier (the
.vdi
file). This will take a few minutes. - Once the installation is complete, select "Restart Now" from the "Installation complete" dialog window.
- When asked "Please remove the installation media and press ENTER", press Enter (a.k.a. Return).
- The virtual machine will then restart, and the Ubuntu login page will load. On this page, select the user you created during the installation, and enter your password to log in.
- Once you have logged in, you have finished setting up your Ubuntu virtual machine. Click through the "What's new in Ubuntu" window for a brief introduction to Ubuntu.
- When you want to close your Ubuntu virtual machine, close the window it is running in to bring up the "Close Virtual Machine" window, select "Power off the machine" and click "OK". This is the equivalent of shutting down the machine. Alternatively, you can select "Power off" within the Ubuntu virtual machine.
Once you have finished installing the Ubuntu virtual machine, you can delete the Ubuntu disk image (filename: ubuntu-18.04.4-desktop-amd64.iso
), and the VirtualBox installer.
At this point, the Ubuntu virtual machine takes up only a small portion of the VirtualBox window it runs in. To increase the screen resolution of the Ubuntu virtual machine, you will need to download the VirtualBox Extension Package and follow the steps below.
- Once downloaded, double click the VirtualBox Extension Pack (file extension
.vbox-extpack
). If you have installed the VirtualBox program, it will open this file. - VirtualBox will open with a window notifying that an extension pack is about to be installed. In this window, select "Install" to proceed with the extension pack installation.
- Scroll to the bottom of the Terms and Conditions window that opens, and select "I Agree" to install the extension pack.
- Open the Ubuntu virtual machine in VirtualBox.
- In the menu bar of the VirtualBox window in which Ubuntu is running, select the "Devices" menu, and select "Insert Guest Additions CD image...".
- A notification will appear in the Ubuntu virtual machine: '"VBox_GAs_6.1.4" contains software intended to be automatically started. Would you like to run it?". In this window, select "Run", and enter your Ubuntu password to install the VirtualBox Guest Additions on the Ubuntu virtual machine.
- A terminal window will open showing the VirtualBox Guest Additions installation progress. Once the installation has finished, press Return (Enter) to close this window.
- Close the Ubuntu virtual machine by closing the window it is running in, and selecting "Power off the machine" from the "Close Virtual Machine" window.
- Open the Ubuntu virtual machine in VirtualBox.
- In the menu bar of the window in which Ubuntu is running, select the "View" menu, and confirm that "Auto-resize Guest Display" is enabled.