Lab implementations for CS:APP 3e. Environment runs on macOS via a lightweight Linux VM — no Docker required.
- macOS (Apple Silicon or Intel)
- Lima
brew install lima
brew install lima-additional-guestagents # required on Apple SiliconAll lab binaries are x86-64 Linux ELF. The included csapp.yaml defines an x86-64 Ubuntu 22.04 VM with all required tooling pre-installed.
Provision (first time):
limactl start ./csapp.yamlDaily use:
limactl shell csapp # open Linux shell
limactl stop csapp # shut down when doneYour macOS home directory is mounted read-write inside the VM at the same path. Edit on macOS, compile and run inside the Lima shell.
All commands run inside the Lima shell.
| Lab | Directory | Command |
|---|---|---|
| Data Lab | data/ |
make && ./driver.pl |
| Bomb Lab | bomb/ |
./bomb |
| Attack Lab | attack/ |
make gdb-ctarget / make gdb-rtarget |
| Cache Lab | cache/ |
make && ./driver.py |
| Shell Lab | shell/ |
make && ./sdriver.pl |
| Malloc Lab | malloc/ |
make && ./mdriver |
| Proxy Lab | proxy/ |
make && ./driver.sh |
The Attack Lab targets require -q to skip the CMU grading server — the attack/Makefile handles this automatically. GDB is pre-configured with Intel syntax via attack/.gdbinit.