CS 326 Operating Systems

Systems and C Development on Windows

Windows presents some compatibility issues for systems programming. More importantly, your programs will be tested on the CS Department Linux lab machines, so it’s easier to develop your programs on a similar platform.

We recommend either running Linux in a dual-boot configuration or as a virtual machine (VM). This is the best option in the long run because you will gain experience using a UNIX-like system, which is a critical skill in both industry and academia.

VMs are a particularly good option because you don’t need to worry about configuring bootloaders, resizing disks, etc. We recommend VirtualBox, a free and open source VM software.

VirtualBox Setup

  1. Download VirtualBox and run the installer. The default install options are fine.
  2. Download pre-built Ubuntu ImageMost recent update: Spring 2018, Ubuntu 16 LTS
  3. In VirtualBox, choose File > Import Appliance and select the pre-built image
  4. Change options as necessary. You may want to increase the amount of RAM allocated to the VM or the number of virtual CPUs if your machine has enough resources.

Click ‘Start’ to boot up the VM. If you’re using a high-DPI display, the Ubuntu desktop may appear to be very small. Use View > Scale Factor to scale the VM display.

Once you reach the Ubuntu desktop, open a Terminal. Click the Ubuntu logo and type ‘Terminal,’ or just right click on the desktop and choose ‘Open Terminal.’ Let’s make sure our packages are up to date and set up the default user account. In the following example, # indicates a comment (not a command to execute).

# Make sure packages are up to date:
sudo apt-get update
sudo apt-get upgrade

# Default user info:
# username: USF
# password: dons
# To change these, run:
passwd
# (and then follow the prompts)

The base set of packages should include all you need to get started. gcc, make, vim, etc. are all installed and ready to go. You can also use GUI editors such as Geany or gedit (shown as Text Editor in the app menus). If you need to install other packages, you can use:

# Search for packages by name:
apt-cache search <package-name>

# Install a package:
sudo apt-get install <package-name>

Finally, you may want to install the VirtualBox additions. This will provide clipboard synchronization and some other nice features like file sharing. It’s as simple as:

  1. Choose Devices > Insert Guest Additions CD from the VirtualBox menu
  2. Follow prompts, then restart the VM

Other Options

While these options might get you close to a Linux installation, you’ll still need to verify that your code works on the department machines.