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.
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:
- Press the New button
- Choose a name for the VM
- Choose Linux as the Type
- Choose the flavor of Linux you are about to install as the Version
- Pick an amount of RAM to give the VM. This can be changed later, so it is not a big deal. You will need more memory allocated to the VM if you are going to be using more graphical programs on it. It is probably not wise to allocate more than half your RAM to the VM.
- Create a virtual hard disk
- Choose VDI
- Choose dynamically allocated. This will be a dynamically sized virtual hard disk, so it will only take up as much room as it needs, not its full capacity.
- Name the disk, optionally choose a location, and pick a max size. Make the max size something you can grow into. I usually pick 64 GB. Again, it will not take up this much space immediately, this is the maximum size it is allowed to take up.
You should now be ready to power on the VM.
Installing Linux
Now you can install your Linux distribution.
- Highlight the VM you just created and hit Start.
- The start-up disk is the ISO image you downloaded. Click the file icon and navigate to it.
- Press start.
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 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.