Unix on a PC

This page gives suggestions for installing some form of Unix on a Windows machine so that you can work on your CIS 15 assignments at home.

It is a combination of things I've tried, and suggestions from graduate students in our research group.

There are basically four options:

  1. Partition: split the hard drive into two "sides" so that you have a Windows "side" (partition) and a Linux partition; when you boot up the machine, you decide which partition you want to use (this is controlled by software called a boot manager). You can set this up so that the Linx partition can see files from the Windows partition. However, the Windows partition cannot see files that are on the Linux partition.

    This is what I do (except I use a MAc, so I have an OSX partition and a Linux partition.

  2. Virtual machine: install software that lets you run Linux from within Windows.

  3. Cygwin: a PC application that pretends to be (a small installation) of Unix. Similar to using a virtual machine, but maybe a bit simpler to set up.

  4. Live CD: run Linux from a CD, without installing anything on your computer; it will be slower and won't be a complete version of Linux, but will be enough for what we do in cis15.

You can also do away with Windows altogether and install Linux on your PC, but I suggest that you use one of the three options above first, use Linux for a while and then decide if it suits all your computing needs.

There are various options for each of these, and then of course you'll need to pick which version of Linux to use.

The one that is most recommended is Ubuntu, which you can download for free here:
---- http://www.ubuntu.com/


There are several choices of software to use for partitioning your hard drive. The most recommended are listed below. One is not free; the others are free. Pick one.

Below, you'll find general instructions for partitioning your hard drive and setting up a "dual boot" system with Linux on one side and Windows on the other.

After you partition your drive, you can install a "boot manager" to manage which partition is chosen when the computer boots up. GAG is a free one that is recommended:
---- http://gag.sourceforge.net/
But don't do this unless you are unhappy with the default boot manager that is installed when you do the partitioning, above.


Again, there are many choices here. You can find a comparison on Wikipedia:
---- http://en.wikipedia.org/wiki/Comparison_of_virtual_machines

The simplest option recommended by our students is VMware Player.

  1. You can download the player software here:
    ---- http://www.vmware.com/download/player/

  2. You only need two files to use the player: (1) a disk image and (2) a machine configuration file.
    For instructions, go here (read below first):
    ---- http://www.ffnn.nl/pages/articles/linux/vmware-player-image-creation.php

Installation of Linux should then be as simple as downloading the CD install disc and mounting it on the VM. Starting the VM should then boot up the disc and installation can begin on that machine.

Option 3: CYGWIN

This is probably the simplest thing to do. The Unix you get is less capable than any of the others, but it will be sufficient for CIS 15.

  1. Go to the Cygwin homepage.
  2. Click on the Install Cygwin icon in the top right corner of the page.
  3. Run the setup.exe file that you download.

    Note that you have to be online for this: the setup program downloads a bunch of files that Cygwin needs.)

  4. When setup asks you questions, you can accept most of the default answer, BUT, you need to make sure that you download g++ otherwise you won't have a compiler. One way to make sure that happens is to download all packages (but that eats a lot of your hard drive).
With Cygwin I suggest that you also install a version of Xemacs (a variant of Emacs):
  1. Download the setup tool for Xemacs.
  2. As for installing Cygwin, you run the setup tool while online, and make the default answers to any questions it asks you.

After installation you should have two new icons in your Programs menu (and probably on your desktop), one for Cygwin, and one for Xemacs.

Starting up Cygwin will give you something that looks like the Terminal from Linux.

If you can't get g++ to run under Cygwin, then:

  1. Double check that you downloaded g++.
  2. Add c:/cygwin/bin to the PATH environment variable (assuming that is the location of the bin directory).

Option 4: LIVE CD

Again, another large set of choices. A list is available here:
---- http://www.frozentech.com/content/livecd.php
A steady high vote-getter on the list is called "SLAX" (from Slacker Linux) and is available here:

General instructions for setting up a dual boot system, if you choose the partitioning option

Here are some suggestions for setting up a dual boot system, assuming Windows is already installed as the only OS and occupies the entire hard disk as Drive C:

  1. If this is a pre-existing Windows installation that you want to keep, do a complete backup!!! This process is "usually" very clean & painless but things happen ... PartImage (on the SystemRescueCD, above) is an excellent way to do this. You might also consider making a completely separate backup of your music, video and other data files segregated from the Windows system and program files -- see step 3.

  2. Use Gparted or PartitionMagic to shrink the C partition down to the desired size -- how big obviously depends on the size of the disk and the size of the programs, data, etc. in the Windows partition.

  3. Use Gparted or PartitionMagic to set up an Extended partition on the rest of the drive. In that Extended partition, create a Linux Swap Partition (twice the size of system RAM is a good rule of thumb), a Linux Partition for the root file system (/), optionally, a separate Linux Partition for the users' /home directories, and optionally, a FAT32 partition which can be used to store files that you want to be accessible to both Windows and Linux. Note that this allows you to make the Windows "C" partition much smaller that it would otherwise have to be -- use this extended partition to hold multimedia & other data files that take up a lot of space.

  4. Reboot & make sure Windows still works.

  5. Install Linux. At the end of the installation process, let it install GRUB boot loader to the MBR of the disk -- when it boots, it will give a menu allowing choice of which OS to boot, and either one can be set as the default.