COMP 3150Operating Systems

Module 1 · Unit 2 of 2

Linux and UNIX Fundamentals

The environment in which every remaining laboratory in the course is carried out. Linux kernel structure, the shell and command line, users and groups, permissions and access control, and a complete systems-programming toolchain.

5 lessons CLO6 — Linux systems programming ≈ 1 week at recommended pace
Linux terminal, file tree, and permission bits A shell prompt runs a compile command, next to a small file tree showing directory permissions rwxr-xr-x, and the compiled binary output. The illustration represents the Linux systems-programming workflow. alice@ubuntu: ~/lab1 alice@ubuntu :~/lab1$ ls -la total 32 drwxr-xr-x 2 alice alice 4096 . drwxr-xr-x 8 alice alice 4096 .. -rw-r--r-- 1 alice alice 412 Makefile -rw-r--r-- 1 alice alice 1284 hello.c alice@ubuntu :~/lab1$ make hello gcc -Wall -g -o hello hello.c build succeeded alice@ubuntu :~/lab1$ ▍ PERMISSIONS -rwxr-xr-x owner group other r = read w = write x = execute owner : alice group : alice chmod 755 chown alice file FILE SYSTEM / → home → alice → lab1 → hello.c · hello · Makefile users · groups · ownership · access control

01 Unit learning outcomes

Upon completion of this unit you will be able to

  • U2.1 — Navigate Linux environments.
  • U2.2 — Manage files, users, and processes.
  • U2.3 — Apply Linux access control.
  • U2.4 — Configure a development environment.
  • U2.5 — Use systems programming tools.

This unit addresses course learning outcome CLO6 — apply Linux systems-programming techniques and operating-system tools. It also supports CLO1 by grounding architectural concepts in a real kernel.

02 Lessons in this unit

Each lesson combines conceptual material with hands-on command-line work. Run the examples on your supplied Linux VM as you go — the muscle memory matters as much as the theory.

03 What you will learn, lesson by lesson

2.1 Linux Overview

  • Describe Linux architecture.
  • Explain kernel responsibilities.
  • Identify Linux subsystems.
  • Explain open-source development.
  • Compare Linux and UNIX.

2.2 Shell and Command Line

  • Navigate file systems.
  • Execute shell commands.
  • Manage files and directories.
  • Use redirection and pipes.
  • Write simple shell scripts.

2.3 Users and Groups

  • Explain user accounts.
  • Explain groups and roles.
  • Manage accounts.
  • Explain privilege separation.
  • Apply secure administration practices.

2.4 Permissions and Access Control

  • Interpret permissions.
  • Modify permissions.
  • Explain ownership.
  • Analyse security implications.
  • Apply least privilege.

2.5 Development Environment

  • Configure Linux development tools.
  • Compile programs with GCC.
  • Use Makefiles.
  • Apply Git version control.
  • Debug using GDB.

04 Worked example

A taste of what the lessons will ask you to do. This example combines file navigation, permissions, and the compile workflow you will use in Lab 1.

Task · build a small program with correct permissions

  1. Navigate to your home directory and create a working folder:
    mkdir ~/lab1 && cd ~/lab1
  2. Create a source file hello.c that prints a greeting.
  3. Confirm the default permissions on the new file:
    ls -l hello.c
    You should see -rw-r--r-- — owner may read and write; group and others may only read.
  4. Compile the program with the standard course flags:
    gcc -Wall -g -o hello hello.c
    The -Wall flag enables warnings and -g includes debug symbols for GDB.
  5. Inspect the new binary. Note that GCC has set the execute bit automatically:
    ls -l hello
    You should see -rwxr-xr-x.
  6. Run the program:
    ./hello

What this example shows

Permissions, the shell, and the toolchain are not separate topics — they form a single workflow. Every laboratory in this course begins from exactly this pattern.

05 Required reading

  • Love, R. — Linux System Programming, Chapters 1–2 (introduction and file I/O background).
  • Stevens & Rago — Advanced Programming in the UNIX Environment, Chapters 1–4 (UNIX basics, file I/O, files and directories).
  • Man pages for ls, chmod, chown, umask, and gcc.

Read the manual

Every command in this unit has a man page. Learning to read man chmod is more valuable than memorising the numeric permission table.

06 Unit discussion

Discussion prompt

The UNIX permission model — three permission bits for three classes of user — has survived for over fifty years. In at least one respect it is too coarse for modern systems; in at least one respect it has proved remarkably durable.

Identify one concrete scenario where the classic permission model is insufficient, and describe how a modern Linux facility (POSIX ACLs, capabilities, SELinux, or similar) addresses the gap. Post your response to the unit forum and reply to at least two classmates.

This activity contributes to your participation grade and supports CLO6 and CLO7.

07 Laboratory connection

Lab 1 — Linux Fundamentals is the first laboratory of the course and is completed at the end of this unit. It covers file-system navigation, permissions, users and groups, shell scripting, and the full GCC / Make / Git / GDB workflow.

Lab 1 coverage
Lesson Lab 1 exercise
2.2 Shell and Command LineFile-system navigation, pipes, and a small shell script
2.3 Users and GroupsCreate a user, assign group membership, verify with id
2.4 PermissionsSet and audit permissions on a small project tree
2.5 Development EnvironmentCompile, version, and debug a starter program

08 Knowledge check & quiz

Quick check before you begin

Question 1

What do the three permission characters rwx mean when they appear in the owner field of a directory's mode?

Show answer
The owner may read the directory (list its entries), write to it (create, rename, and delete entries), and execute it (traverse it — that is, use it as a component in a path).

Question 2

Why does the course standardise on gcc -Wall -g rather than plain gcc?

Show answer
-Wall enables a broad set of compiler warnings so that likely bugs surface at build time. -g emits debug information so that GDB can map machine instructions back to source lines. Together they make debugging tractable — which matters enormously once the course reaches concurrent code.

After completing all five lessons, take the Unit 2 quiz in the LMS. It covers Linux architecture, the shell, users and groups, permissions, and the development toolchain.

👤