Installing Linux in a VM

We will examine how Linux implements some of the concepts from the book. It is well suited for this purpose because, relative to Windows and macOS, much of the underlying functionality of Linux is exposed.

Rather than installing Linux on your computer as one of your primary operating systems, you can install it in a virtual machine. This means it can run as a program within your current operating system. This way you can play around with it and even crash it without having to reboot your computer.

Choosing a Distribution

There are many Linux distributions and all have their advantages and disadvantages. You may pick any one you choose, or try out more than one.

Ubuntu is very popular and it is easy to get up and running. However it is also a larger download and will take up a decent amount of space (~10 GB) on your computer. Unless you do not have the hard drive space or know you want to try out a different specific distribution, I recommend installing Ubuntu.

Debian (on which Ubuntu is based) is a smaller download and will suite the needs of this class but it has a little bit more of a learning curve than Ubuntu. My preferred way to install Debian is to download the network installer here. You want the “Small CDs or USB sticks” amd64 image.

Other popular distributions include Linux Mint, Fedora, and CentOS.

Do not get too bogged down in your choice of distribution, as any functioning Linux distribution should work for this class. Whichever distribution you choose, go to the web site and download an ISO of the latest stable desktop release. For example, at Ubuntu’s website you can click “Download” -> “20.04 LTS”, which will automatically download an ISO. This part might take a while. Now is a good time to start making popcorn.

Installing VirtualBox

VirtualBox allows you to run virtual machines in OS X, Windows, Linux, and Solaris.

Download and install the appropriate version for your platform.

Creating a virtual machine

Open up VirtualBox and make a new VM like so:

You should now be ready to power on the VM.

Installing Linux

Now you can install your Linux distribution.

Now, in the main VirtualBox Manager window, highlight the VM image you created and press the green arrow that says “Start”. You will likely get a pop-up window from VirtualBox explaining which key will enable keyboard input for the host. If you click on the screen for the VM, your keyboard/mouse may get stuck there. To return keyboard/mouse input back to your host machine, use the following key: left command button (Mac) or right Ctrl key (Windows). In this new window for the VM, it will run the operating system installer. Now you can walk through the installer of whatever distribution you chose. Most are pretty straightforward. VMs are easily disposable, so if you screw it up or want to change it you can simply reinstall in a new VM.

Note that you DO want to select format or erase entire hard drive in the installer. This will format the virtual hard drive, not your actual hard drive.

Once installation is complete, you will need to reboot the VM.

VirtualBox Guest Additions

To take full advantage of your VM you should install VirtualBox guest additions. This is pretty straightforward in Ubuntu. In the VirtualBox menu select Devices -> Install Guest Additions CD Image. Let it download the image, insert it, and install.

Once guest additions is installed, once again repeat the steps:

Once guest additions is installed you can do things like resize the VM window and it will adjust the resolution automatically, and you can run your VM in proper fullscreen.

Submission

Answer the questions in the answers.md file that came with the assignment and push your answers to git-keeper.