The University of Queensland Homepage
School of ITEE ITEE Main Website

 Running UNIX-like systems at home

There are a number of options for running UNIX on your home PC.  Some methods will suit some people better than others, so follow the instructions which suit you best.  A word of warning before commencement though:  All assignments are tested and marked on the agave server, NOT on any other system.  So, before submitting code that you've written on some other system, make sure it works on agave!  Allow plenty of time for this process.  We will not accept any responsibility for assignments not working correctly because you haven't tested your code on agave.

  1. Remote access:  the simplest and easiest way to get a form of Unix at home is to access agave remotely, according to the guidelines found at this page.  If you have a fast internet connection, graphical applications might work acceptably in this way.
  2. Running Linux on your home PC.  Any version of Linux is suitable - examples include Fedora Core and Ubuntu.  If you know how to install these, feel free to download and use them.  If you don't have experience with these or are uncomfortable with installing a second operating system on your home PC, then skip to option 3.
  3. Run Linux using a virtual machine.  A virtual machine allows you to emulate the hardware of a PC and run whatever operating system you like on top of your current operating system.  In order to do this, follow these steps:
    • Download and install VMWare Player from here.  Unfortunately due to licensing restrictions, we cannot host this locally.
    • Download hdd.zip - this is a hard disk image (approximately 745MB).  This file is an image of a hard drive with Fedora Core 8 Linux installed.  Unzip to a working directory (such as C:\COMP2303).  This may take a little while - it is a big file!  (Updated: an alternative file is now available: hdd.7z.  This uses a more efficient compression algorithm, and is now around 500MB and should fit on a single CD.  The contents are the same, just the compression method is different.)
    • Download pc.vmx (approximately 2KB).  This describes the hardware that VMWare should emulate, including the hard disk above.  Place this in the same directory as above.
    • Double-click pc.vmx.  This should start up VMWare Player, and after a few seconds you should see Linux start to boot.  The boot process will take a while, depending on the speed of your PC.  Remember that the system is being emulated, so everything will be a little slower than if it were running natively on your PC.
    • Once booted, you should see a welcome screen, something like the following:

     

    • A user account called comp2303 has been created.  The password is comp2303.
    • Once logged in, you should see a desktop - feel free to explore what's there.  To start a terminal, follow the steps shown:

      Applications=>System Tools=>Terminal

       

    • From the terminal, all the applications described in lectures should work - ls, cd, pwd, make, gcc, svn, ssh etc.
    • Because the system is running inside an emulator, you cannot directly access files on your local machine.  VMWare emulates network hardware though, which makes it easy enough to transfer files to the host machine.  Assuming the host is Windows (Vista, XP or 2000 should all work in a very similar way), create a directory on the Windows host machine that you will share, for example c:\COMP2303_share
    • Right-click on the folder and select Properties=>Sharing.  Select "Share this folder" as shown:
    • This will allow other computers on your network (which includes the Linux virtual machine running under VMWare, even if there are no other PCs on your network) to access the files in this folder.  You may need to alter the permissions for your particular machine.
    • On the Linux virtual machine, you can now access the shared directory using samba - open the file explorer (Applications=>System Tools=>File Browser) and enter the following: smb://ip address (inserting your host machine's IP address as appropriate).  You should see the share folder, something like the following.  You may also be prompted to enter a username and password - these will be the username for the host machine (NOT comp2303!).

      It would be useful to be able to "map" this connection within Linux, so that you can access the files from Windows easily.  This is easy enough to do: you need to "mount" the Windows directory somewhere within the Linux filesystem.

      • Most of the operations below require you to have root access, which is slightly tricky on Fedora!  First, you need to edit the file /etc/sudoers.  Doing this will allow you to execute commands as the root user.  Type the following: su --login -c /usr/sbin/visudo.  You will be prompted for a password - this is "comp2303".
      • This should open up a file in vi.  Go to line 77 and add a line below the line "root ALL=(ALL)   ALL", with the following on it: "comp2303 ALL=(ALL)   ALL" (without the quotes).
      • Save and exit the file.
      • Type "su" at the command prompt.  Enter the password (comp2303).  You should then notice that the command prompt now says "root@localhost".  You can now execute commands as if you were root!
      • Create a directory on the Linux system where you will mount the Windows directory to. Something like "mkdir /mnt/win" will do the job.
      • The image provided doesn't have a suitable version of a package that's required... so copy these two files samba-common.rpm and samba-client.rpm into your home directory on Linux and double-click them.  This should start up the Fedora installer:

       

      • Click Apply and Install anyway when it asks if you're sure.  The process shouldn't take long - only a few seconds.
      • Next, you need to mount the Windows directory.  The command to use is: "mount -t cifs //ip address/directory /mnt/win", substituting the host IP address and whatever share name you've assigned under Windows.  If your Windows machine has a password associated, you'll need to add an option to specify what username to use to connect to the Windows machine.  Something like: "mount -t cifs -o user=windowsusername,domain=domain //ip address/directory /mnt/win", substituting in appropriate values for your particular system.
      • If this command succeeds, your Windows directory should be successfully mounted - "ls /mnt/win" should confirm this for you.

       

    • If you want to verify that networking is up and running, you can try loading a page in Firefox under the virtual machine.
    •   Note that Firefox does seem to be very slow to load - I'm not sure why it takes as long as it does.  You may also have some trouble accessing sites that require a proxy - the following was loaded on a ADSL connection from UQConnect, while www.google.com wasn't accessible.

    • If you've got this far, you have successfully run Unix on a Windows PC - feel free to explore what's there.  The installation provided is fairly minimal - a lot of the applications which are installed by default under Linux are not included.  All the applications we will be using in this course are there though!