↑↓ move Enter open Esc close

System call

How a program asks the kernel to do something.

User programs cannot touch hardware directly. When a program needs to open a file, allocate memory or send a network packet, it makes a system call: a controlled entry into the kernel, which validates permissions and performs the operation.

Most commands are thin wrappers over a few: cd is chdir(), rm is unlink(), mv is rename(), mkdir is mkdir(). Knowing the underlying call often explains a command's exact behavior better than its manual page.

See it in practice

$ strace -c ls 2>&1 | tail -12

Counts the system calls a simple ls makes. Every file it lists went through openat, getdents and friends.

Where you'll meet it

Learn these concepts by typing them: the interactive course builds them up lesson by lesson in a real simulated shell.