Linux Virtual Machine

  1. Download VirtualBox from http://virtualbox.org and install. Mac users—be sure to read this troubleshooting item below before running the VirtualBox installer.
  2. Download the Lubuntu 20.04 64-bit ISO file and save it.
  3. Start VirtualBox. If the menu is in German, select Datei → Einstellungen → Sprache → English → Ok.
  4. Select New → Name: Lubuntu, Type → Linux, Version: Ubuntu (64 Bit), Next. Confirm that RAM is at least 1024 MB → Next → Create → Next → Next. Confirm the disk size is at least 10 GB → Create
  5. Select Settings → Network → Adapter 1. Change Attached To from NAT to Bridged, then Ok
  6. Select Settings → System → Processor. If the Enable PAE/NX is unchecked, check it. If that displays a warning triangle, see the first entry in the Troubleshooting section.
  7. Select Settings → Storage. Click on the CD ROM labeled Empty. Click on the teensy tiny CD ROM icon all the way to the right, next to “IDE Secondary Master”, then select Choose a disk file. In the file picker, navigate to the Download directory and select the ISO file that you just downloaded.
  8. Select Start to start the virtual machine.
  9. In the language selection screen, hit Enter. In the next screen, use the ↓ cursor key to select Start Lubuntu and hit Enter.
  10. Click on the CD ROM icon at the left to run the installer
  11. Welcome: Select American English, then Next
  12. Location: Accept the German time zone, then Next
  13. Keyboard: Select German if you have a German keyboard, then Next
  14. Partitions: Erase disk, then Next
  15. Users: Give your name as user and the password as secret. Really. Don't provide your name. Don't choose a fancy password. Confirm the password secret and then click Next
  16. On the next screen, select Minimal installation and click Continue
  17. On the next screen, click Install
  18. On the screen that asks you to confirm changes to the disk, click Install now
  19. When installation is complete, click on Done, then press Enter when prompted. When the virtual machine has restarted, log in with password secret.
  20. Open a terminal (Control+Alt+T). Type the command
    sudo apt install gcc make xterm curl
    Hit Enter. Provide your password and hit Enter when prompted. Then hit Y and Enter when prompted.
  21. In the VirtualBox menu, select Devices → Insert Guest Additions CD image. That's from the VirtualBox menu just on top of the virtual machine.
  22. Wait a few seconds. You will get a dialog asking whether to open the content. Click Ok.
  23. Double-click on autorun.sh. Choose Execute in Terminal
  24. Enter password secret when prompted
  25. After a while, the terminal with title VirtualBox Guest Additions installation displays a message Press return to close this window... Hit Enter.
  26. Select Devices → Shared Clipboard → Bidirectional in the VirtualBox menu.
  27. In your host operating system (Windows or Mac), create a folder that you name shared in your home directory (or the desktop if you prefer)
  28. In the VirtualBox menu, select Devices → Shared Folders → Shared Folders settings, click on the teensy tiny folder with a + icon in the right margin, Click on the Folder path dropdown menu and click Other. In the file picker, pick the folder that you just created. Folder Name: enter shared. Click Auto-mount and Make Permanent (if you have that option). Leave the mount point blank and hit Ok.
  29. Pick the bird icon on the lower left corner, then Leave → Reboot → Yes. When the virtual machine has restarted, log back in and open a terminal (Control+Alt+T). Copy the following commands, one line at a time
    ln -s /media/sf_shared shared
    sudo groupadd -f vboxsf
    sudo usermod -a -G vboxsf $USER
    ip addr show | grep -o 'inet [0-9.]*'
    python3 -m http.server 8080
    
    Paste each one into the terminal (Edit → Paste from the terminal menu or Shift+Ctrl+V). If prompted, provide your password secret.
  30. Look at the IP addresses that are shown by the second-to-last command. Ignore 127.0.0.1 and copy the next address (just the numbers and dots after inet). In your host operating system (Windows or Mac), point your browser to http://____________:8080. That is, type http://, paste in the address that you just copied, and add :8080 after it. Hit Enter. If you see a directory listing, all is good. Shut down the virtual machine. (Bird icon → Leave → Shutdown)
  31. Congratulations—you have successfully installed a virtual machine that can communicate with its host!

Troubleshooting