Skip to content
Codescope

Track 06 · Linux

The Linux track

The filesystem, permission bits, processes and pipelines — things you can watch run.

45 concepts mapped · 7 interactive now · 46 steps · free, no login

IntermediateBuild on the fundamentals with the mechanics working developers meet daily.

01Filesystem

3 of 5 live

One tree, and what a filename actually refers to.

  1. 01

    The filesystem & paths

    One tree, one root, and every path is either from here or from the top.

    intro7 min7 steps
    0%
  2. 02

    File permissions & chmod

    Nine bits, three groups of three. 644 is not a magic number — it is binary.

    intro9 min7 steps
    0%
  3. 03

    Inodes, hard links & symlinks

    A filename is not the file. It is a directory entry pointing at one.

    core9 min6 steps
    0%
  4. 04

    Mounting & devices

    upcoming

    Disks appear as directories; /dev is files that are hardware.

  5. 05

    Disk usage: df, du & quotas

    upcoming

    Why df and du disagree, and where the space actually went.

02The shell

2 of 5 live

What the shell does to your command before running it.

  1. 06

    Pipes & redirection

    Every process is born with three streams. Redirection just re-plugs them.

    core10 min7 steps
    0%
  2. 07

    Globbing & expansion

    upcoming

    The shell expands *, not the command — and the order matters.

  3. 08

    Quoting rules

    upcoming

    Single, double and none — the difference that breaks scripts on spaces.

  4. 09

    Variables & the environment

    Shell variables, exported variables, and what a child process inherits.

    intro7 min5 steps
    0%
  5. 10

    Scripts, exit codes & conditionals

    upcoming

    $?, set -e, and why [ is a command rather than syntax.

03Text processing

1 of 5 live

The tools that make the pipeline worth having.

  1. 11

    grep & regular expressions

    Matching lines, and the difference between basic and extended regex.

    core8 min6 steps
    0%
  2. 12

    sed: stream editing

    upcoming

    Substitution, addresses and in-place edits.

  3. 13

    awk: fields & records

    upcoming

    Every line split into fields, with a pattern-action program over them.

  4. 14

    sort, uniq, cut & tr

    upcoming

    The small tools that do most of the work in a real pipeline.

  5. 15

    find & xargs

    upcoming

    Walking the tree by predicate, and safely acting on the results.

04Processes

1 of 4 live

What is running, and how to control it.

  1. 16

    Processes, fork & signals

    Running a command means copying a process, then replacing what it is running.

    core10 min8 steps
    0%
  2. 17

    Job control

    upcoming

    Ctrl-Z, bg, fg, nohup — and why closing the terminal kills things.

  3. 18

    top, ps & process states

    upcoming

    Running, sleeping, uninterruptible — and what load average measures.

  4. 19

    cron & systemd services

    upcoming

    Scheduling work, and why your cron job cannot find its commands.

05Users & networking

0 of 4 live

Who you are, and how the machine talks.

  1. 20

    Users, groups & sudo

    upcoming

    UIDs, group membership, and what root actually means.

  2. 21

    SSH & key authentication

    upcoming

    Public keys, known_hosts, and why permissions on ~/.ssh matter.

  3. 22

    Ports, sockets & listening services

    upcoming

    What ss and netstat show, and what a port really is.

  4. 23

    curl & inspecting HTTP

    upcoming

    Headers, status codes and following redirects from the terminal.

BeginnerStart here — no prior programming experience required.

06Packages & performance

0 of 4 live

Installing software and finding the bottleneck.

  1. 24

    Package managers

    upcoming

    apt, dnf and pacman — repositories, dependencies and lock files.

  2. 25

    Compiling from source

    upcoming

    configure, make, install — and where the files actually land.

  3. 26

    Memory, cache & swap

    upcoming

    Why free shows almost no free memory, and why that is correct.

  4. 27

    Logs & journald

    upcoming

    Where things get written, and how to follow them live.

AdvancedDeep internals, specialist tooling, and the topics you reach for at scale.

07Kernel & devices

0 of 4 live

The kernel side of the boundary you crossed with syscalls.

  1. 28

    Loadable kernel modules

    upcoming12 min

    Extend the kernel at runtime with insmod, rmmod, and lsmod.

    • Write a minimal 'hello, world' kernel module in C
    • Load and unload with insmod/rmmod, inspect with lsmod
    • Read module output from dmesg
  2. 29

    /sys and /proc — the kernel as files

    upcoming10 min

    Read CPU count, control fan speed, or tweak a driver — all by touching text files.

    • Read /proc/meminfo, /proc/[pid]/status, /proc/cpuinfo
    • Understand /sys as a typed view of kernel objects
    • Change kernel parameters through /proc/sys and sysctl
  3. 30

    Character vs block devices

    upcoming10 min

    /dev/null is a character device. /dev/sda is a block device. That distinction runs deep.

    • Distinguish character, block, and pseudo devices
    • Read a device's major/minor number from ls -l
    • Create device nodes with mknod
  4. 31

    kprobes & tracepoints

    upcoming11 min

    Attach probes to any kernel function without recompiling.

    • Register a kprobe on a kernel function
    • Compare kprobes to static tracepoints
    • Feed probe data into perf and trace-cmd

08Containers & isolation

0 of 5 live

How a Docker container is really a process with kernel restrictions.

  1. 32

    Namespaces (PID, network, mount, user)

    upcoming13 min

    The kernel gives each process its own view of PIDs, mounts, network, and users.

    • List a process's namespaces via /proc/[pid]/ns
    • Enter a namespace with nsenter
    • Understand how each namespace type isolates a different resource
  2. 33

    cgroups: CPU, memory & I/O limits

    upcoming12 min

    Cap a process at 2 GB of RAM and half a CPU core, enforced by the kernel.

    • Read /sys/fs/cgroup to inspect a container's limits
    • Set memory.max and cpu.max on a cgroup v2 slice
    • Diagnose an OOM kill traced to a cgroup limit
  3. 34

    OverlayFS & union mounts

    upcoming11 min

    Stack layers so a read-only base plus a writable top look like one filesystem.

    • Mount an overlay with lowerdir + upperdir + workdir
    • Explain how Docker image layers use this
    • Understand copy-up on first write
  4. 35

    seccomp: syscall filtering

    upcoming11 min

    Give a process a whitelist of allowed syscalls — anything else terminates it.

    • Load a BPF seccomp filter with prctl
    • Recognise a seccomp-imposed EPERM in strace output
    • Balance strictness against unexpected library syscalls
  5. 36

    Linux capabilities

    upcoming10 min

    Break root's superpowers into 40+ fine-grained bits.

    • Read a binary's file capabilities with getcap
    • Grant CAP_NET_BIND_SERVICE without giving full root
    • Drop capabilities inside a process with capset

09Networking deep

0 of 4 live

The kernel side of TCP/IP, packet filtering, and virtual networks.

  1. 37

    Berkeley sockets in C

    upcoming13 min

    socket(), bind(), listen(), accept() — the ancient API every server still uses.

    • Write a TCP echo server with the raw syscall interface
    • Handle EAGAIN and EINTR correctly
    • Compare blocking, non-blocking, and epoll-driven I/O
  2. 38

    iptables, nftables & netfilter

    upcoming12 min

    The kernel's hook points where packets are inspected and rewritten.

    • Read the four tables (filter, nat, mangle, raw) and their chains
    • Write a rule to redirect a port with DNAT
    • Understand where nftables differs from iptables syntax
  3. 39

    Network namespaces & veth pairs

    upcoming12 min

    Build a private network inside a namespace — the core of container networking.

    • Create a netns with ip netns add
    • Connect two namespaces with a veth pair
    • Add a bridge to route between them
  4. 40

    ss & tcpdump

    upcoming11 min

    Inspect connections and capture packets on the wire.

    • Read ss -tlnp to see who is listening on what port
    • Capture and filter with tcpdump 'tcp port 443'
    • Correlate a slow request with retransmits in the capture

10Observability

0 of 5 live

Tracing what a running system is actually doing.

  1. 41

    strace deep dive

    upcoming10 min

    Watch every syscall, argument, and return value — the ultimate debugging tool.

    • Filter with -e trace= and -e signal=
    • Attach to a running process with -p
    • Diagnose 'why is my app slow' with -c summary
  2. 42

    ltrace — library call tracing

    upcoming8 min

    Like strace, but for dynamically linked function calls.

    • Trace calls to libc, libssl, and application libraries
    • Filter with -e to focus on specific functions
    • Combine with strace to see the full picture
  3. 43

    perf: CPU profiling

    upcoming13 min

    Hardware performance counters, sampling profiler, flame graphs.

    • Sample CPU with perf record; view with perf report
    • Generate a flame graph from perf output
    • Read cache-miss and branch-miss counters
  4. 44

    eBPF & bcc/bpftrace

    upcoming14 min

    Safe kernel-level programmes that observe and trace anything.

    • Write a one-liner with bpftrace
    • Attach an eBPF programme to a syscall entry point
    • Understand the eBPF verifier and its constraints
  5. 45

    ftrace — function tracing

    upcoming10 min

    The kernel's built-in tracer, exposed via /sys/kernel/tracing.

    • Enable function_graph tracing for one function
    • Read a call graph with entry/return timings
    • Compare ftrace against perf and eBPF for the same job

The full syllabus is listed above in teaching order. Concepts marked upcoming are mapped but not yet built as visualizations. Progress is kept in this browser only.