Michael Kerrisk The Linux Programming Interface
What You Actually Need to Know About the LPIC
The Linux Programming Interface by Michael Kerrisk isn't just another reference book. It's effectively the single most practical systems programming resource available for anyone working with the Linux kernel directly. The full title is The Linux Programming Interface: A Linux and UNIX System Programming Handbook. It covers syscalls, file I/O, processes, signals, and everything in between with actual code examples you can compile and run. I picked this up about eight years ago when I was debugging a process scheduling issue on a production box. The problem involved SIGRTMIN and how it interacted with certain glibc versions. Most documentation points you to the manual pages, but Kerrisk's treatment of real-time signals actually explains why your signal handler might not fire in the order you expect when multiple threads are involved. That specific chapter alone saved me two days of head-scratching. The book itself is massive. Over a thousand pages. I know, that sounds intimidating, but you don't read it cover to cover. You use it like a reference, flip to the chapter you need, and read through the examples. The chapter on file descriptors and the open() flags alone is worth the price of admission. O_CLOEXEC, O_DIRECT, O_SYNC, O_NOATIME — these aren't abstract concepts in this book. Kerrisk shows you what happens when you get them wrong, and I've seen plenty of production incidents caused by someone forgetting to set FD_CLOEXEC on a socket descriptor.
Getting Started With the Material
The source code for every example in the book is available from the author's website at man7.org/tips. You download the tarball, compile with the provided Makefiles, and start running through the examples. I'd recommend doing this on a clean Linux VM or container so you aren't accidentally breaking a live system while testing edge cases. Each chapter ends with exercises. Some of them are genuinely tricky. The one on fork() semantics where you have to predict output after multiple fork calls without using any synchronization — that exercise actually taught me more about process creation than any lecture ever did. There's a solutions section at the back if you get stuck, which you will.
What the Book Gets Right That Other Sources Miss
Most documentation treats POSIX and Linux-specific extensions as separate things. Kerrisk doesn't. He shows you where Linux diverges from the POSIX standard and flags it clearly. For instance, the implementation of epoll. It's Linux-specific, but he explains the internal mechanics well enough that you understand why it's faster than select() or poll() beyond just the obvious scaling argument. The page fault behavior under MADVISE vs. direct mmap is another topic that's poorly documented elsewhere. One thing nobody talks about enough: the interaction between mount namespaces and file descriptor inheritance. I ran into a situation where a daemon was passing file descriptors across a socket to a child process that had entered a new mount namespace. The child couldn't access the file even though the descriptor was valid. Kerrisk's coverage of namespaces and how they relate to resource handles helped me trace this back to the root cause within an hour instead of spending a week chasing symptoms.

The Practical Limitations
The book covers Linux 2.6 through 4.x quite thoroughly. If you're running newer kernels and need coverage of features added after that window — io_uring, bpf system calls, the newer eBPF tracing interfaces — you'll need to supplement with the online man pages on man7.org, which Kerrisk maintains separately. The book is a snapshot. The man pages are living documentation. Another issue: the examples assume a standard x86_64 environment with glibc. If you're working on ARM, MIPS, or with musl instead of glibc, some of the syscall behavior and header differences mean you'll hit snags. The code is portable in principle, but the text occasionally assumes x86 semantics when discussing registers and calling conventions. I also found that the section on memory-mapped files and shared memory, while excellent theoretically, doesn't fully address the performance characteristics you encounter on modern hardware with non-uniform memory access. The NUMA implications of mmap on multi-socket systems are worth investigating separately if that's your use case.
Where to Find It
The book is available through publishers like No Starch Press. The source code and errata are maintained at man7.org. Kerrisk also has a blog where he posts updates and corrections. I check it periodically because the Linux kernel moves fast and some of the older examples need tweaking for newer releases. There's also the companion web resource at linuxprogramminginterface.com which mirrors the content and links to the PDF versions of certain chapters. Not all of it is free, but the sample chapters are generous enough to determine whether the book fits your needs before you commit to buying it.
A Note on Approach
Don't try to memorize anything from this book. The syscall signatures, the flag constants, the return values — you'll forget them. That's normal. The point is to understand the model. Once you internalize how the Linux kernel exposes functionality through the syscall interface, you can look up the details when you need them. The book gives you the framework. The rest is practice. I keep a copy on my desk. Not the physical book anymore — the PDF on my workstation. I reference it maybe twice a month now, usually when something subtle comes up in a production debugging session. It hasn't let me down yet.

Galeria
-
Linux System and Network Programming by Michael Kerrisk | Goodreads -
The Linux Programming Interface: A Linux and UNIX System Programming ... -
The Linux Programming Interface : A Linux and UNIX System Programming ...