The Linux Programming Interface is the definitive guide to the Linux and UNIX programming interface—the interface employed by nearly every application that runs on a Linux or UNIX system.
In this authoritative work, Linux programming expert Michael Kerrisk provides detailed descriptions of the system calls and library functions that you need in order to master the craft of system programming, and accompanies his explanations with clear, complete example programs.
You'll find descriptions of over 500 system calls and library functions, and more than 200 example programs, 88 tables, and 115 diagrams. You'll learn how to:
• Read and write files efficiently
• Use signals, clocks, and timers
• Create processes and execute programs
• Write secure programs
• Write multithreaded programs using POSIX threads
• Build and use shared libraries
• Perform interprocess communication using pipes, message queues, shared memory, and semaphores
• Write network applications with the sockets API
While The Linux Programming Interface covers a wealth of Linux-specific features, including epoll, inotify, and the /proc file system, its emphasis on UNIX standards (POSIX.1-2001/SUSv3 and POSIX.1-2008/SUSv4) makes it equally valuable to programmers working on other UNIX platforms.
The Linux Programming Interface is the most comprehensive single-volume work on the Linux and UNIX programming interface, and a book that's destined to become a new classic.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A comprehensive, standards-aware handbook for anyone who needs to write or debug low-level Linux/UNIX software, from students meeting system calls for the first time to experienced engineers who want a single authoritative reference beside the machine.
【Book Arc】
- **Opening (~0%–10%)**: Frames the book’s scope and credibility—system calls, library functions, POSIX/SUS standards, and the promise of worked examples—so readers know this is a reference-plus-tutorial, not a kernel-internals text.
- **Early (~10%–30%)**: Builds the foundation: UNIX/C history, fundamental concepts, system-programming mechanics (errors, portability, feature-test macros), then file I/O, processes, memory allocation, users/groups, time, limits, and file-system basics.
- **Middle (~30%–55%)**: Moves into process control and richer I/O: signals from fundamentals through advanced handlers, timers, process creation/execution, threads, file attributes, directories/links, and file-event monitoring.
- **Late (~55%–80%)**: Covers the machinery of larger systems: shared libraries, IPC overview, System V and POSIX IPC (message queues, semaphores, shared memory), memory mappings, virtual-memory operations, and file locking.
- **Ending (~80%–100%)**: Applies the API to network and terminal programming: sockets from UNIX domain through TCP/IP and server design, advanced socket topics, terminals, alternative I/O models, pseudoterminals, plus appendices on tracing, option parsing, NULL casting, kernel configuration, and further sources.
【Key Takeaways】
- **The book is organized as a progressive system-programming curriculum, not a random API dump** (Early): it starts with concepts and portability, then layers file I/O, processes, signals, threads, IPC, and sockets so each topic rests on earlier material.
- **Standards awareness is a first-class concern** (Early): POSIX.1-2001/SUSv3 and POSIX.1-2008/SUSv4 are treated as the baseline, which is why the material transfers to other UNIX platforms even when Linux-specific features are discussed.
- **File I/O is taught as a universal model with important edge cases** (Middle): the basics expand into duplicated descriptors, positioned and scatter-gather I/O, truncation, nonblocking I/O, large files, `/dev/fd`, and temporary files.
- **Processes, memory, and credentials are inseparable from real system behavior** (Middle): process layout, `brk`/`sbrk`, `malloc`/`free`, stack allocation, password/shadow files, and process credentials all shape how programs actually run.
- **Signals and timers require careful, staged understanding** (Middle): the book separates fundamental concepts, handler design, and advanced features, which is exactly where many production bugs hide.
- **IPC is presented as a family of trade-offs** (Late): pipes/FIFOs, System V IPC, POSIX IPC, memory mappings, and file locking are compared through use cases rather than presented as isolated APIs.
- **Sockets and server design are the applied culmination** (Ending): UNIX-domain and Internet sockets, TCP/IP fundamentals, server design, advanced socket topics, and alternative I/O models connect the API to networked services.
- **The book is designed for hands-on use** (Early): example programs, exercises, tables, and diagrams are integral, and appendices support tracing system calls, parsing options, and finding further information.
【Reading Tips】
- **Read the early conceptual chapters properly** (history, fundamental concepts, system-programming concepts, portability): they are short relative to the whole book but prevent confusion later.
- **Deep-read the file I/O, process, signal, and IPC chapters** if you write production systems code; these are the highest-leverage areas and the ones most often misunderstood.
- **Use the later socket and server-design chapters as a project companion**: build a small client/server or IPC tool while reading rather than trying to memorize APIs.
- **Skim Linux-specific corners on a first pass** (for example `/proc`, `epoll`, `inotify`, pseudoterminals) and return when a real problem requires them.
- **Treat exercises and appendices as part of the text**: they turn a reference into a working course and help you verify assumptions about system-call behavior.
【Coverage Limits】
This guide is synthesized from the book’s front matter, praise, brief contents, and selected early/middle excerpts; the excerpts do not cover the full detail of every chapter, so specific examples, exercises, and later chapter contents are summarized at the structural level rather than reproduced.
Page 1
early every application that runs on a Linux or UNIX system. In this authoritative work, Linux programming expert Michael Kerrisk provides detailed descripti...
UNIX and C ........................................................................................2 1.2 A Brief History of Linux ..............................
settime() ........................................ 498 23.6.3 Retrieving the Current Value of a Timer: timer_gettime() ............................. 499 23.6...
.................................................... 624 29.6 Joining with a Terminated Thread..................................................................
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
The Linux programming interface a Linux and UNIX system programming handbook (Michael Kerrisk)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
The Linux programming interface a Linux and UNIX system programming handbook (Michael Kerrisk)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
The Linux programming interface a Linux and UNIX system programming handbook (Michael Kerrisk)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
《The Linux Programming Interface》是一部面向 Linux 与 UNIX 系统编程的权威手册,作者 Michael Kerrisk 以系统调用和库函数为线索,梳理应用程序与操作系统内核打交道的整套接口。书中强调,几乎所有运行在 Linux 或 UNIX 上的应用都依赖这套编程接口,因此理解它,是从“会写代码”走向“懂系统”的关键一步。全书以 C 语言系统编程为核心,既讲接口的语义与用法,也讲背后的规范与约定,帮助读者写出正确、可移植、符合标准的程序。
从目录线索看,读者可以抓住几条主要脉络。其一是基础规范:书中先交代 UNIX 与 C 的历史渊源、POSIX 与 SUS 标准,以及系统调用与库函数的区别、错误处理和可移植性约定,回答“为什么这样写才规范”。其二是文件 I/O 主干:从通用 I/O 模型讲起,涉及 I/O 的通用性、打开文件等操作,并进一步讨论内核如何控制文件 I/O 的缓冲以及各类 I/O 缓冲的总结,帮助建立“一切皆文件”的底层直觉。其三是进程与资源:目录中出现用户与组、进程凭证等...
Digital LibraryAI Assistant
Hi — I can help you pick a book. Tell me a topic, language, or level, e.g. “a light English read”. If that's too broad, I'll ask one follow-up.
Loading comments...
Reply to Comment
Edit Comment