on October 28, 2010
"Advanced Programming in the UNIX Environment" by Richard Stevens (2nd Edition updated by Stephen Rago in 2005) has been THE standard for UNIX system programming since the first edition came out in 1992. It is clear, correct and comprehensive. Another really excellent book is the updated edition of Marc Rochkind's "Advanced UNIX Programming." So it is unexpected that a new UNIX system programming book should come out that stands head and shoulders above the Stevens and Rochkind books, but Michael Kerrisk's "The Linux Programming Interface" does.
Kerrisk's book is more thorough, more comprehensive and just as well written as the Stevens and Rochkind books. It covers over 500 system calls in the SUSv3 and SUSv4 specification in 64 chapters, using 200 example programs, 88 tables, 115 diagrams and 1506 pages. It's a monumental work, and it's really very good. It is now easily THE standard book on Linux/UNIX system programming.
No work, no matter how good, is perfect, and I do have two small niggles, neither of which detract from its 5 star rating. (1) Some chapters have only one exercise. I wish there had been more. But, on the plus side, most chapters have at least one solution to an exercise. And, (2) the only treatment of debugging is a two page appendix on strace(1). I would have like to have had some discussion on the use of systemtap, gdb and other tools in debugging programs that use system calls.
All in all, an outstandingly good book and unreservedly recommended.
on October 29, 2010
I received a copy of this from the publisher, and boy am I glad I did. It's a wonderful book that's an absolute keeper.
I've done quite a bit of systems level programming with POSIX systems and Linux and I wish that I'd had this book earlier primarily because its descriptions of systems-level programming on Linux are incredibly clear and detailed. Critically, the book is well written and never boring. I found it a pleasure to dip into different sections where I did know the subject (e.g. TCP and sockets) and where I did not (e.g. memory mapped files).
I then passed the book around in my office and a couple of days later got feedback from people that it had been very useful and that people thought it was well worth getting an office copy.
I was worried when the back cover claimed that the book was a 'new classic', but I think it's likely to be justified. It's nicely written and fun to read, and covers topics in depth. The most important thing is that the author has achieved the right balance in his descriptions and is able to explain clearly a huge variety of topics.
on November 26, 2010
I don't have much to add to Vladimir Ivanovic's review, except to echo that this is an outstanding book in the style of Stevens' (and Rago's) beloved classic Advanced Programming in the UNIX Environment. I am now recommending it to my friends and colleagues over Stevens. Covers the same territory as Stevens and more, since it contains the entire Linux system call interface. The treatment of each system call is very thorough, indicating deviations from the Single UNIX Specification and comparisons with various Unix flavors.
This is not a "how to program" book, but you will definitely learn a lot about programming from it. I would recommend it to anyone who is serious about Linux/Unix programming in C, or actually in any language.
on December 2, 2010
"The Linux Programming Interface" is a very comprehensive book targeted at programmers and is concerned with teaching the system calls and library functions provided by the Linux operating system. It also makes a good Linux programmer's reference book. So far I have read about one third of the 1500 pages, but I can already say it is one of the best programming books that I have ever encountered. I had a background in Windows software development with only limited knowledge of Linux programming, and wanted to increase my Linux knowledge. This book definitely helped with that. It is well written and well organized with good use of diagrams and code examples. The preface recommends that readers should already be familiar with programming in general and C programming in particular.
on November 14, 2010
I can't imagine how much work went into producing this volume. Every page seems to jump out of the nice, hard-bound cover with something interesting or exciting such as Chapter 38's discussion of writing secure privileged programs or Chapter 43's table 43-1 collection of "Identifiers and handles for various types of IPC facilities." This extensive work is a pinnacle collection of all things specific to programming Linux at the system call level. From the maintainer of man pages, we have an extension of them in this book. If you tend to think of man pages as more of a "what," this volume gives us the "what" with the "why."
The back cover heralds the work as "the definitive guide to Linux and UNIX system programming," and it is very thoroughly true. If you want to learn how to program Perl or Python, this isn't it. The examples are notably and obviously in C. C is the language of UNIX systems programmers and of the Linux kernel. Likewise, you won't find a dissertation on Gnome versus KDE. It is my opinion that this book is for the hacker who logs into the machine at runlevel 3 or, if at 5, first opens a terminal window in order to do "real work."
I strongly encourage you to obtain a copy of this book. If you're at all serious about Linux system programming, you'll be amazed at the insight produced on the pages of this extensive volume. I searched for at least one "bad" thing throughout it, you know, just to see if there was a blemish worthy of mention or some reason that 5 stars wasn't quite right. I haven't found one yet.
There are books that you simply love and want to read over and over again that you present 5 passionate stars. This book is the kind that is a wealth of information in your hands and is simply worth 5 valued stars because you'll use it that often. If you're a systems programmer, this work is probably both types.
I believe that if you hold yourself as a skilled system programmer, that this book will either confirm it or help you find any flaws with your system concepts and implementation choices. So far, I haven't found any part of it that didn't offer me some useful nugget of quality information or insightful anecdote.
If you are a Linux geek, you probably need this book and will benefit as much as I do from reading, browsing and referencing it as you write your code.
on February 22, 2011
I pre-ordered this book back in Sept 2010 and received just days before my honeymoon and while the wife didn't let me bring my laptop, she let me bring this book! I don't think I could have picked a better book to carry around 8000 miles. :)
This book is simply the best Linux programming book since Stevens' Unix programming books. It is very current covering the recent 2.6 kernel updates and SUSv4 specification. This book is an awesome 64 chapters of just about every aspect of Linux systems programming you can think of.
It has great coverage of the file system API, pthreads, socket programming, virtual memory, and so much more. I'm more of a server developer, so I was pleased to find daemons and advanced socket I/O covered in detail, especially the epoll() API.
This book is pure C, so you won't find any C++ or STL, but that's actually a good thing because it keeps the examples really simple. And of course the APIs described work just fine with C++. :)
The only thing this book is missing is possibly an appendix on gdb and valgrind. It does however have an appendix on strace. This book doesn't cover Autotools, so you may want to pick up a copy of Autotools: A Practioner's Guide to GNU Autoconf, Automake, and Libtool, which is also published by No Starch Press.
I seriously recommend this book to anybody who is interested in Linux programming. I recommend buying both the print and ebook versions so you don't have to carry this 5.1 pound book around, but it is nice to be able to mark up the book. Go buy this book!
on March 8, 2016
This is without a doubt the best written technical book I've ever read; it's honestly hard to believe only one person wrote and organized it. In an era where you can often get a better answer from a highly voted Stack Overflow question than you'll find most books, TLPI is 100% an exception.
The material is presented in such a fashion that pretty much anyone with a working knowledge of C can pick it up, sit down, and understand any of its topics. Kerrisk often opens with a code-light "overview" chapter on the more dense topics (e.g. networking), and his descriptions are as elegant and well-written as anything you'll find on SO or by googling. He then walks through the topic with an in-depth discussion of the various APIs and excellent example code, crucially often also mentioning now-outdated approaches you will still see pop up, so the reader isn't clueless when encountering pre-POSIX code in real life.
It's the rare book indeed which can serve as both an excellently written (and illustrated!) introduction and reference. If you're a student looking to get into linux systems programming (or been assigned some less than high quality reading), pick this up. if you're a programmer of the type who often finds himself typing "man 2 somethingsomething...", absolutely 100% pick this up. The fact that the author is also in charge of the man pages project for linux shows in his encyclopedic knowledge--what makes this book so outstanding is his ability to present that knowledge in an easily-digested form with tight, well-written examples.
Yes, it's massive. But trust me, there isn't a page wasted in here--even if you're experienced in the area, walking through each chapter and digesting Kerrisk's explanations will serve you well. And to any professors or teachers out there who are curious: yes, please use this as your textbook. As a grad student who hasn't been in CS for very long, I was extremely fortunate to be assigned this as a textbook for a systems programming class. Without this book, there's no way I couldn't have learned as much as I did in a fairly short period of time; more importantly, it made me come to appreciate and enjoy systems programming. It combines the readability/working examples of the best Stack Overflow answers, the comprehensiveness of man pages, and logical progression for new learners in one amazingly tight (if not light) package.
on August 11, 2013
* Name: Charles
* Age: 23
* Purchased: May, 2013
 -> The book is divided into chapters.
 -> Each chapter has multiple sections.
 -> Each chapter ends with a summary.
 -> At the very end of each chapter are exercises meant to reinforce what was learned in the chapter.
This is by far one of the best computer science texts I own. I did not purchase this book as a requirement for a class (though I am a student), but I did purchase it for 'personal consumption' and to further my knowledge of programming and grow as a unix/linux systems programmer.
I have read many computer science books by many different publishers and I have to admit I really enjoy the books that I own that were printed by No Starch press. I was turned on to this book by an interest in C/C++ socket programming and systems programming in general. I have a background in web development and had been programming in C for about a year when I purchased this book.
There is something to learn for everyone in this book, regardless of how many years or decades of experience you have. The book starts with a history of Unix, Linux, and standards, and then progresses into the great detail the inner workings of linux and unix.
One of my biggest disappointments with most other programming books is that the authors use bad analogies to explain how things work, or fail to explain how things work at all and only offer a shallow glimpse into the subject. Some authors seem to go back over their books adding stupid and unintelligent filler to try and make the book longer. This book is over 1500 pages and each page is jam packed with information. In fact, I'm sure there was information that was deemed 'not important' enough to make it into this book, and thus the book references how one can find more information on a topic.
I have so many good things to say about this book, I highly recommend it to anybody with an interest in linux systems programming. You will need an understanding of C programming to get through the book. If you are looking for a book on how to program in C, this is not the book. If you are a C programmer, or are learning C, and would like a book that shows you how to apply your programming knowledge to the linux and unix operating systems, this is a book for you.
This is a book for system admins, network admins, hackers, teachers and professors, students (high school, college, or graduate), makers, computer scientists, etc.
This is one book that I know I will carry with me everywhere. Or I will buy multiple copies so that I don't have to lug around this heavy, 1500+ pg hardcover book. Definitely a book you want at home, at the office, on the plain, in the car, in the bathroom, or anywhere else you can think of reading!
This is the most well written programming book that I own!
on February 16, 2013
I recently moved into a position requiring the use of a lot of programming using the POSIX standard, which I was rather unfamiliar with. This provides an expansive coverage of that, as well as other nuances of the general programming environment requiring attention. While it's not exhaustive, this is enough knowledge to get you off the ground very quickly and still be useful for reference. A solid knowledge of C is required, but not a whole lot else.
on July 20, 2012
The depth and breadth of this book is simply amazing. It covers pretty much everything what a software engineer should know about Linux system calls, and much more. It is very clearly written, with tons of great examples and questions at the end of each chapter. This is not just a great Linux book, but probably one of the best technical book I've ever read. The editing and format of the book is also excellent - although they do exist -, I did not find any obvious errors, certainly not one that altered the understanding of a topic.
I read it in tutorial style (i.e. linearly almost every chapter), but one could easily use it as a reference, since most of the chapters stands on their own, as all the relevant and important information is either referenced or reiterated.
My only problem that the electronic version should have been included (just like Manning Publication's books); since the size of the book prevents you to carry it around (1500+ pages with a fairly small font)...
After this book, I'd blindly buy anything from Michael Kerrisk.