Instructions for assignments in this course will generally assume a Linux-like environment. It is likely also possible to complete assignments in other environments, such as the using the Windows Subsystem for Linux or Mac OS X natively, but we are limited in the technical support we can provide for that.
To assist you with obtaining a Linux environment, we supply several options below:
Department accounts
We will provide you with accounts on the department machines. Unfortatunely, we can’t easily let you run qemu (needed for our teaching OS assignments), but for all other assignments, you should be able to use the department machines via remote desktop or SSH.
Our VM image
We have supplied a Ubuntu 20.04 VM image for this course, which you can download here. The main account is called “student” and has password “password”. See below for a list of what is installed on this VM. We expect to work with VirtualBox.
Alternative: create your own VM using vagrant (SSH access to VM only; possibly better for resource-constrained systems)
If you are concerned about VM performance, one alternative you might consider is using vagrant which, once installed you could use by setting aside a directory to work on the VM and running commands like the following:
-
setup command that needs to be run once; will create a configuration file called
Vagrantfile
in the current directory:vagrant init ubuntu/focal64
-
to start/stop the VM or check whether it is running
vagrant up vagrant status vagrant suspend vagrant resume vagrant halt
-
to get a shell in the VM:
vagrant ssh
-
to upload a file to the VM (without using the shared folder that’s usually configured):
vagrant upload LOCAL-FILE REMOTE-FILE
-
to download a file from the VM (without using the shared folder that’s usually configured; unfortunately, I can only see a rather indirect way of doing this without shared folders):
vagrant ssh-config >./temp-ssh-config scp -i temp-ssh-config default:REMOTE-FILE LOCAL-FILE
In the default configuration /vagrant
in the VM will be shared with the folder you ran the vagrant
commands in outside the VM. Note that because of how sharing folders between the guest and host OS works,
some things (such as producing executables) sometimes will not function correctly in the shared folders.
If this happens, try copying files out of the shared folders to other directories in the VM.
If you use the vagrant option, you may need to install software packages that are preinstalled on our VM. You could do this as necessary, or install the list of software packages below.
Alternative: create your own VM using VirtualBox (graphical interface)
- Download VirtualBox from https://www.virtualbox.org/wiki/Downloads. Choose the appropriate version for your host operating system.
- Download the Ubuntu 20.04 LTS disk image from https://ubuntu.com/download/desktop. (It will be an
.iso
file.) - In VirtualBox, goto “New” in the “Machine” menu to create a new virtual machine. Select the type as “Linux” and the version as “Ubuntu (64-bit)”. Choose to create a new virtual hard disk.
- When asked for the size of the virtual hard disk, I recommend around 20 GB but the default of 10 GB is probaly sufficient. The default settings for the type of disk are fine.
- Right-click the newly created VM in the list of virtual machines and select “Settings” from the context menu that pops up.
- In the settings window, select the tab labeled storage, and click the button with a square and plus overlayed on it second from the bottom-left of the list of storage devices. (If you hover over this button, the tool tip “Add a new storage attachment” will appear.)
- From the short menu that appears when selecting that button, press “Optical Disk”.
- In the “Medium” window that appears, click the “Add” button at the top and locate the
.iso
file you downloaded in step 2, then press choose to select it. - Start the virtual machine and follow the Ubuntu installer’s own screen prompts.
-
After the install finishes, you can run a command like
sudo apt-get install build-essential g++-multilib manpages-posix-dev python3-dev python-setuptools qemu-system-x86 qemu-utils bless ghex
to install most of the important tools we’ll use this semester.
Packages on our reference VM
We provide this for reference, not all of these packages are necessary for this course.
Installed as with sudo apt-get install PACKAGE-NAME
:
- ubuntu-desktop-minimal
- fonts-ubuntu
- build-essential
- gcc-multilib
- g++-multilib
- python3-dev
- ghex
- bless
- qemu-utils
- qemu-system-x86
- manpages-posix-dev
- manpages-posix
- wget
- curl
- firefox
- ca-certificates
- gedit
- gnome-terminal
- gnome-screenshot
- xdg-utils
- bash
- vim-gtk3
- emacs-gtk
- nano
- openssh-client
- snapd
- git
- python3-dev
- python3-venv
- python3-nose
- python3-parameterized
- python2-dev
- python2
- python-setuptools
- flex
Installed as with sudo snap install --classic PACKAGE-NAME
:
- code