Set up Linux Virtual Machine

  1. Download virtual box (by Oracle) from https://www.virtualbox.org/wiki/Downloads
    Description Filename Size
    VirtualBox 6.0.12 for Windows hosts x86/amd64 VirtualBox-6.0.12-133076-Win.exe 162MB
    VirtualBox 6.0.12 Oracle VM VirtualBox Extension Pack All platforms Oracle_VM_VirtualBox_Extension_Pack-6.0.12.vbox-extpack 22MB
    (or use more recent version if any)

    Note that virtual box has a menu item under File to check for updates. An updated version can simpy be installed over the top and it doesn't remove any existing VMs which have been created. It is important to upgrade the extension pack as well.

  2. Install virtual box then double click on the Oracle_VM_VirtualBox_Extension_Pack-6.0.12.vbox-extpack to install the extensions pack
  3. Download ubuntu from https://www.ubuntu.com/download/desktop : Either
    Description Filename Size
    32 bit Ubuntu ubuntu-14.04.1-desktop-i386.iso ?
    64 bit Ubuntu ubuntu-14.04.1-desktop-amd64.iso 0.99GB
    64 bit Ubuntu ubuntu-16.04.2-desktop-amd64.iso 1.44GB
    64 bit Ubuntu ubuntu-18.04.3-desktop-amd64.iso 1.93GB
    [or use more recent version if any]
  4. New a virtual box. Use 20GB dynamic drive. Use 64MB display memory. Set cd drive to ubuntu iso image.
  5. Start guest and install ubuntu
  6. In a terminal:
    
    sudo apt-get update
    sudo apt-get upgrade
    
  7. Under menu 'Devices' select "Install guest additions...'. This will install things in guest (i.e. ubuntu).
    Reboot guest? Should now find desktop resizes to the window.
  8. Under menu 'Devices' select "Shared clipboard'. Make this bidirectional.

Set up a shared folder [optional]

  1. Under menu 'Devices' selected 'Shared folders...'. Make c:\developer a shared folder named 'developer'.
    Automount = yes.
    Access = full.
  2. On guest under /home/david, mkdir developer.
  3. In a terminal:
    
    sudo gedit /etc/rc.local
    
    before the exit(0) line, add the line:
    
    mount -t vboxsf -o uid=1000,gid=1000,rw,exec,dmode=0755 developer /home/david/developer
    
    reboot guest, then confirm that /home/david/developer has files from c:\developer.

Essential build tools

You can install build-essential in order to install dpkg-dev, gcc, g++, libc6-dev and make.

In a terminal type the following:


sudo apt-get update
sudo apt-get install build-essential    

On Ubuntu 18.04 this installs gcc version 7.4.0 and GNU Make version 4.1.

But this doesn't install cmake or git. The following commands can be used:


sudo apt install cmake
sudo apt install git

Install Visual Studio Code

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux.

See Visual Studio Code on Linux.

You can type the following into a terminal:


sudo snap install --classic code

Python

Ubuntu 18.04 comes with python3 installed but not python2. It can be installed by running the following command in a terminal:


sudo apt install python

Tree

The tree command is handy for dumping directory structures. It can be installed with the command:


sudo apt install tree