Beautifully written book, a model of clarity and succinctness, equivalent to K&R's C Programming Language book, but surprisingly readable from front to back too. I've been working with Unix and Linux since both became available in the UK and I think they're both beautiful from an engineering viewpoint, but often they're not well explained from a systems programming perspective. This book - along with W. Richard Stevens' book, "Advanced Programming in The Unix Environment" - are the best available on the subject in my humble view. I particularly like Kerrisk's because he obviously thought long and hard about the best way to present the material in a narrative format in the opening part of the book where he walks through key concepts, but then he shows the same consideration in each subsequent chapter where he does more of a deep-dive into each kernel subsystem, meaning that it's a book that readers can return to again and again when they want to explore a topic in more depth. It's also a very comprehensive programmer's guide - the coverage is excellent, and the material is bang up-to-date.
Great book, pulling together a raft of information I had in lots of separate places. Very clear, very well explained, and the author has the code examples online which are clean, simple and easily built. It is a really relevant book for anyone writing a significant amount of Linux application (userspace) code.
This book will not teach you C and will assume you have some prior experience in writing C code. Very much command line - this is a book about how programs communicate with each other and the Linux system, not about graphical user interfaces. It is the fundamentals you need to know to write solid/reliable Linux applications.
Physically this is big book, and certainly not something to want to constantly carry around with you - but it is well structured enough to be useful for quick reference, and even a reminders of Linux facilities available to you to "solve a problem". As technical books go - it is very readable.
So the obvious downside is the cost, but in my mind it was worth it for something pretty well up to date and although the code examples are free to download, in reality in buying the book you are compensating the author for the effort he has put in making those clear examples.
Last week I got my grubby mitts on a clean, white and shiny new copy of The Linux Programming Interface ("A Linux and UNIX System Programming Handbook") by Michael Kerrisk.
So far I've read only a few chapters in detail, skimmed over one or two others, and dived around in it to look some things up. Just a week after receiving it is probably too soon for a fair review of such an enormous book, but Michael asked me if I would consider writing one (after I contacted him -- I don't know him personally), and it's the least I can do to thank him for what I can already tell is going to be a stupendously useful book.
From its uncluttered no-nonsense title and cover design, right down to its nitty-gritty technical details, it's obvious that this is a clear, well thought out, and well written book by someone who knows their subject matter inside and out. That's no surprise: Michael Kerrisk is maintainer and a major contributor to the Linux man-pages project. But let's be clear, this book isn't just a bunch of man pages glued together and given a cover!
Despite its large size (over 60 chapters, 1500+ pages) and level of detail, this is a surprisingly readable guidebook for UNIX system calls with a particular focus on Linux. The chapters are arranged such that they can be read in order with minimal forward-referencing. Topics covered range from the history of UNIX and fundamental systems concepts, through file i/o and file systems, processes & threads, IPC, up to advanced socket techniques and alternative I/O models. The book has a fairly comprehensive (although not exhaustive) index. The chapter list at man7.org provides a complete picture. The IPC chapters by themselves look as good as any other book I've seen on the subject.
The topics are covered in enough detail to make the book useful as a reference, but retaining a readable style throughout. It does a good job of pointing out some of the UNIX and C library quirks that might get lost in the detail of pure reference material. The book doesn't stray too far from the main focus -- the system calls themselves -- and provides references to other sources that cover related topics in more detail. There are plenty of diagrams and examples, including source code (available from man7.org). Source examples tend to be fairly simple illustrations of individual or related system calls. The book is not too code-heavy and doesn't just go through the motions of listing every possible call and parameter. After all, you already have the freely-available man pages for that. (It's occasionally useful to have a BASH prompt to hand while reading it.)
This isn't a beginner's book: a certain level of basic UNIX/Linux knowledge and a good grasp of C programming is a pre-requisite to a book like this. There is a good balance of introductory and advanced material without "dumbing down" or sacrificing of important detail.
The chapters on sockets, while quite short, cover a surprising amount of detailed ground, although a discussion of some of the more important TCP options available with setsockopt() is notably lacking. To be fair, this isn't a socket-programming book, and references to other sources of information are provided. However, I did think this was an odd omission considering the level of detail provided elsewhere in the book.
There are some exercises at the end of chapters with selected answers provided. I think this is one area that could be expanded and improved for readers who might want to treat the book like a `self-study' course or use it in an educational environment.
Any book this size with this level of technical detail inevitably has some errors, and it was after reporting one (minor) mistake that the author asked if I would consider posting a review. However, I was apparently only the second person to report one! Considering how many eyes must have glanced over this book already, that surely says something about the book's accuracy. The book has its own web page on the author's site (man7.org) where there is an errata section and a list of kernel changes since the book was released. It looks like this book will be well supported, even as the Linux kernel continues to march on its evolutionary path.
As you can probably tell from the overall tone of this review, I'm very pleased with my purchase. I plan to read this cover-to-cover over the next couple of months, and I will probably get a second copy on expenses to sit on my desk at work! I may post a follow-up review later, once I've had more time to read and reflect.
I would recommend this book to any Linux programmer.
I've been working as a C / C++ programmer for many years and good systems level API documentation is often hard to come by. Resources will often document API function calls in quite some detail but fail to explain how they were intended to be used properly. This can lead to a long time spent debugging applications that, as far as you understand, should be implemented correctly. This book does not suffer from that shortcoming!
This book does an excellent job at explaining both the function calls and how they are intended to be used. Every part I've delved into has explained it's subject in depth and with a surprising level of clarity. In short, it's the Linux API book I've always wanted! If you need a book detailing File I/O and Locking, Processes, Memory Allocation, Access Control, Signals, Threads, Daemons, Pipes, Sockets and more and to an excellent level of detail, then the almost 1500 pages of information here are - in my option - well worth the price tag. A rare gem indeed.
I purchased this book to help me solve one simple task: implement two timers on Linux. Our game engine has hi-res and lo-res timers. The man pages were not descriptive enough for me, so after some searching I found this book, and, oh boy, I am glad I bought it! I was able to find more information in 10 minutes reading the book than in 1 hour on the internet, and the quality of the text is excellent as well. This book should a first stop for anyone trying to do some Linux programming. (Hard cover and quality of the paper/print justifies the price.)
A definitive and monumental guide to the System call and C library on Linux. The author of this book acts as guide to the jungle, going into the undergrowth, covering everything up to socket programming. The table of contents alone comes to 17 pages! I consider myself a tough reviewer, and am slightly awe-struck.
The book succeeds on several levels: As a reference work.
For example code - there is extensive sample code, available both "as in the book", and "value added" tarballs with extra comments and examples.
As an elucidator - there are challenge problems at the end of most chapters, and selected solutions to exercises.
Criticisms? Well, size - it comes in at over 1500 pages, but it's perverse to criticise a definitive guide for excess "definitive-ness". Another slight weakness is that the sample code has been released under the LGPL, which may set a licencing trap for the unwary.
Disclosure: I received a review copy from O'Reilly.
The author combines programming examples with substantial, well-written narratives that describe why things are so. By being devoted to linux, this book is more specific to Stevens, but compares to it. I hope the author will consider bringing some of the rich detail avilable here back into the man page system.
This book is simply great. It brings you through all the linux programming interface (the title couldn't be better), but it can also be used as an everyday reference. There are a lot of details that often can't be easily found with a web search, which is gold. Having it in Kindle format is even better, due to the large size of the printed book, I can have it literally everywhere.
In my 45 years of computer experience I have come across several outstanding documents that have supported my coding: "IBM System 360 Principles of Operation", the set of RSX11/M manuals, and K&R. This book stands proudly on my bookshelves beside them.
However, I dislike the binding, which does injustice to an otherwise outstanding book. It is listed as a hardback, yet is a glued paperback with hard covers. Amazon should should stop misrepresenting "perfect bindings" as hardbacks/case bindings.
If you're looking for a book that can describe how Linux Programming works and at the same time with lots and lots of examples, this is for you. I've been searching for some time and never found a good book, until now. It's very well written, the language used is some what technical, but you can only read this book if you already know how to program in C or C++ and use Linux. The author introduces and describes the chapter subject in deep, covering the subject and giving you all the ideas behind and how they work - You get to know how Linux really works. The examples are very good and for the chapter in question, it does cover well the subject. They are not easy to understand if you never program or even don't use Linux in a daily basis, but you get there. It covers everything you need to write programs for Linux.
Definitely a good book - I'm using it all the time