UNIHIVE

Study Hub UNIPORT CSC 394

CSC 394 · Operating Systems

Case study: UNIX and Linux

UNIX history and design ideas, the kernel and shell, processes, the file system and permissions, common commands, and Linux and Android today.

Our notes

2 min read

History

UNIX was written at Bell Labs (1969) by Ken Thompson and Dennis Ritchie, rewritten in C (1973), which made it portable to other machines. Versions spread through universities (BSD from Berkeley) and companies (System V, Solaris, AIX). Linux was started by Linus Torvalds (1991) as a free UNIX-like kernel; with GNU tools it forms full systems (Ubuntu, Debian, Fedora). Android runs on the Linux kernel; macOS and iOS descend from BSD UNIX.

Design ideas ("the UNIX philosophy")

  • Small programs that each do one thing well.
  • Programs that work together through pipes.
  • "Everything is a file" (devices appear as files in /dev).
  • Plain-text configuration.

Structure

Hardware → kernel (process management, memory, file system, device drivers, system calls) → shell and utilities → user programs. The kernel is monolithic (Linux uses loadable modules).

Processes in UNIX

  • Every process has a PID; the first is init (now systemd on most Linux), parent of all.
  • fork() + exec() create new programs; wait() collects children; signals (kill -9 PID sends SIGKILL).
  • Scheduling: Linux uses the Completely Fair Scheduler (CFS, until 2023) and then EEVDF, which share CPU time fairly by weighted priority; nice values from −20 (highest) to 19 (lowest).

File system

  • One tree starting at / (root): /bin, /etc (configuration), /home (users' files), /dev (devices), /tmp, /var (logs), /usr.
  • Each file has an inode holding its attributes and block pointers; the directory maps names to inode numbers. Hard links share an inode; symbolic links point to a path.
  • File systems: ext4, XFS, Btrfs.

Permissions

Three classes (user, group, others) × three rights (read, write, execute). Shown by ls -l as -rwxr-xr--.
Octal: r = 4, w = 2, x = 1. rwx = 7, r-x = 5, r-- = 4.
Worked example. chmod 754 file → user rwx (7), group r-x (5), others r-- (4) → -rwxr-xr--. And -rw-r----- is 640.
The superuser (root) can do anything; sudo runs one command as root.

Common commands

CommandDoes
ls, cd, pwdlist, change, show directory
cp, mv, rm, mkdircopy, move/rename, delete, make directory
cat, less, head, tailshow files
grep "word" filesearch text
chmod, chownchange permissions, owner
ps, top, killlist, watch, end processes
man commandthe manual page

Pipes and redirection: ls -l | grep ".txt" > list.txt sends matching lines into a file.

Why it matters today

Most web servers, cloud machines, supercomputers and phones (Android) run Linux; UniHive's own hosting runs on Linux. Learning the shell is a practical skill for any computing job.

Exams usually ask: brief history of UNIX and Linux; UNIX design philosophy; kernel vs shell; the UNIX file tree and inodes; permissions and chmod in octal; process commands; pipes.

Common mistake: reading chmod digits as user/others/group. The order is always user, group, others.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 394 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.