Short book review: The Linux Programming Interface

There are many programming and computer books out there and I’ve read many. Some were good, some were bad, some just plain fucking terrible.

But some books out there are so good that they become classics and a standard for other books and “must reads” for everyone interested in the topic. The book “The Linux Programming Interface” by Michael Kerrisk is such a book. It is the best book on Linux system programming ever published and will be for many years to come.

I don’t do much system programming at work and my main interest is in Java and Scala but most of the software I’ve written professionally runs on a Linux system (Linux is fantastic for your Java stuff!). So it always helps to know how the underlying operating system works. Some programmers focus too much on fancy frameworks but ignore the basics like how an OS works, how memory is allocated and freed, how HTTP works, etc. You don’t have to be an expert on this stuff but should know at least the basics. And every Java, Scala, Ruby or Python programmer should know some C and know how memory management works – you will love Java or Scala even more after learning about that. 🙂

Let’s talk about the book: It is a huge tome with more than 1,500 pages. It covers everything you will want to know about Linux and Unix system programming. The focus is on Linux but standard APIs like POSIX are covered in detail and so this book is also great if you work with Solaris, FreeBSD and other Unix like operating systems. Functionality specific to Linux like epoll is also covered in detail.

The examples are all written in C. This makes senses as Linux itself is written mostly in C and the kernel and standard APIs are C. But most of this functionality is also available in libraries for languages like Python, Ruby or – if you really want to go down that road – for Perl.

I won’t go into details of each chapter – they are all great. The text is easy to read and the explanations are always clear and very detailed. The source code is clear and easy to read – even if you don’t know much C.
The examples are easy to get running on your own Linux system and if you want to use a Ruby or Python library that wraps the C calls, you won’t have much trouble understanding them.

Whenever I want to know something about low level Linux system programming I find it in this awesome book.

As I wrote above, this book will be – or already is – a classic and a must read for everyone who wants to learn Linux system programming or just runs programs on Linux or another Unix system.

The book’s website is here:
The Linux Programming Interface