CITS2002 Systems Programming  
 

Unit home

Project 1

help2002

Lecture & Workshop
recordings on LMS

Schedule

FAQ

Unit outline

C textbooks

OS textbooks

Information resources


Extra reading

Past projects

Recent feedback


Working effectively

Look after yourself!

Operating System and C compiler software

In 2024 the two programming projects for this unit, contributing 50% of the unit's assessment, will be marked on either the Linux or macOS operating systems (the choice is really yours).

  • If your computer is already running Windows-11, you may run Ubuntu Linux within the standard Windows Subsystem for Linux version-2 (WSL-2) application (if your computer is running Windows-10, you are strongly encouraged to upgrade to Windows-11.

  • If your computer is already running Linux, then any modern and up-to-date distribution will be a suitable substitute for Ubuntu Linux in CITS2002.

  • If your computer is an Intel or Apple Silicon based Apple Mac, running macOS v13 (Ventura) or v14 (Sonoma), you will be able to undertake laboratory exercises and projects without much difficulty.

Ubuntu Linux and macOS will both require command-line software tools, collectively termed developer tools, to complete laboratory exercises and projects. Most important will be a compiler (actually the whole toolchain) that supports the C11 programming language. Under Linux the preferred C compiler is gcc, and under macOS the preferred C compiler is clang. Throughout the unit, to avoid confusion, we will not identify the compiler being used, and will just execute the installed compiler with the command cc.

This page provides brief instructions on how to set up the necessary software on your own laptop or desktop computer - the operating systems and a C compiler and libraries.

If you feel that something should be added to these instructions, please email [email protected].


Installing Linux on your laptop or desktop computer

Unless you already know what you're doing (and already have your favourite Linux distribution) you're encouraged to use the very popular and well-supported Ubuntu for desktops. Ubuntu releases a new distribution every six months, either a stable LTS (long-term support) release, or a (possibly) less-stable experimental/develop release.

The current stable release is Ubuntu LTS-24.04 (released April 2024, named "Noble Numbat") and is the one recommended for this unit.

While later releases will become available, and include more recent software packages, none will be required for this unit - so choose the stable 24.04 release when prompted or searching.

On your own laptop or desktop computer it is recommended that you install Linux:


The default installations of Linux (either native, or within WSL-2) are often minimal, possibly not up-to-date, and do not provide a number of helpful Linux utilities for software development. The following steps, all executed at the Linux shell, will download and install a suitable set of additional software packages.

Just cut-and-paste the following commands using your mouse. The first time you run sudo, it will ask for your Linux password.

  1. Firstly, ensure that your Linux distribution is up-to-date:

    prompt> sudo apt-get update && sudo apt-get upgrade
    prompt> sudo apt-get dist-upgrade && sudo apt-get autoremove

  2. Then install some packages to bring provide a reasonable working environment:

    prompt> sudo apt install build-essential findutils vim curl openssh-client less apt-utils git
    ...prompts, downloads and installs about 110 requested packages

    prompt> sudo apt install man-db manpages-posix
    ...installs online 'man' pages for common commands

    prompt> sudo apt install manpages-dev manpages-posix-dev
    ...installs online 'man' pages for software development


Setting up software on your Apple laptop or desktop computer

Ensure that your Mac is running macOS v12 (Monterey), v13 (Ventura). Many improved features and security fixes are provided in these newer versions.

  1. From the App Store download and install Xcode (Developer Tools), at least version 14. While the whole download is 14GB, we will not be using most of its components in this unit.

  2. To minimally test the Xcode installation, invoke Spotlight Search (⌘ Space), type terminal, carriage-return to invoke Terminal application, then

    prompt> cc

    and expect to see "clang: error: no input files"
    If you type

    prompt> make

    you should see "make: *** No targets specified and no makefile found. Stop."

    You may also need to install Apple's additional command-line tools, with:

    prompt> xcode-select --install

If you use your Apple Mac for software development everyday, it's strongly recommended that you install and use Homebrew, "The Missing Package Manager for macOS".

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Presented by [email protected]