Skip to content

Advanced Linux Programming – book with free PDF (2001)

advancedlinuxprogramming.com
229 pointsnonrecursive36 comments
On HN

Comments

Two alternative, and better, choices, if you're willing to spend a few dollars (and hopefully expense it to your manager):

The Linux Programming Interface: http://www.amazon.com/Linux-Programming-Interface-System-Han...

Advanced Programming in the UNIX Environment: http://www.amazon.com/Advanced-Programming-UNIX-Environment-...

A not-too-distant third choice, Linux System Programming: http://www.amazon.com/Linux-System-Programming-Talking-Direc...

In my opinion these are best two books on the subject. Stevens' book is classic and have been updated quite recently (3rd edition came out 3 years ago), LPI is very extensive and have some specific Linux info not present in Stevens' book and is clearly influenced by Stevens book.

Stevens is dead many years ago. The second and the third editions were written by Rago. He is a good author but he is not Stevens.

How strongly do you recommend these books? Unfortunately I'm a college student without much cash to toss around, but I can scrape together enough for a book if it'll make me a better programmer in the long run.

If you want to learn what's one layer beneath the hood of most higher-level language environments, they are well worth the investment. And IMO this stuff is worth learning. One day, you will be glad to know it when you use strace to successfully debug why your application doesn't work, while the rest of your coworkers tear up more code in befuddlement :-)

LPI is the way to go.

I just started doing kernel devlopment professionally, and ironically the content of LPI is relatively higher level.

Glad I read it before starting though.

I'd recommend this book instead 'The Linux Programming Interface' http://man7.org/tlpi/ it's a lot more recent and the content is excellent, though it's not a free download. The author is also the maintainer of the linux man pages.

Well I don't think it is so much better, I is very usefull but it seems to my more like a manual than a book

> http://advancedlinuxprogramming.com/about.html

This appears to be the first edition of the book, published in 2001. Is this book still useful, considering it's 15 years old?

Some of the subjects it treats are low-level enough (and of Unix-ish heritage) that their treatment is probably not irrelevant today. The performance considerations of threads and processes are probably out of date, but their API (sections 3 and 4) is largely still the same. Same for shared memory and other IPC mechanisms described in section 5. The API re. section 7 still applies -- /proc has expanded considerably since 2001, but it's still used in the same manner. Chapter 8 is probably more out of date than others, but you can still follow it. Stuff in 9 is probably not used much anymore, an #10, while adequate, would probably be considered incomplete today.

I'd say it's still useful to someone who comes to Linux from other platforms, or to people who are already using Linux but aren't familiar with systems programming under it.

Edit: although, as someone else pointed out, APUE is probably a better choice (and was a better choice back in 2001, too).

If you're looking for a better maintained book, I'd recommend "Advanced Programming in the UNIX Environment" by W. Richard Stevens, revised by Stephen A. Rago. It's not a free PDF however, but well worth the money.

With the exception of systemd versus init, the big ideas are pretty much unchanged. Details around hardware and distribution features should be kept in historical perspective and application context, by which I mean that a 2001 64 megabytes of RAM desktop might be today's embedded system and most people won't have to configure networking over two dial up modems.

For me, the critical issue with technical books is readability and accessibility. If it's in front of me and I enjoy reading it because I'm learning something, that's often good enough. If I were already an expert Linux programmer, then I might have different criteria. I know I ain't.

This book is dated - there was the kernel 2.4 and a lot of system calls were changed or removed - but I think it is one of the best book available on GNU/Linux system programming.

I love "UNIX Systems Programming: Communication, Concurrency and Threads", it is simply great.

I am getting interested in Unix programming, but essentially starting from scratch. I've read through the first two chapters of the The Linux Programming Interface, and while I think it is a great book, so far it has not been easy for me to find points of entry. I think it might not be the best book for me to start with.

I've just started How Linux Works, but I thought I might take this opportunity to ask for suggestions for someone trying to get started (doesn't have to be a book).

Raymond's The Art of Unix Programming is a good resource for understanding the design philosophy of Unix...and by extension Linux. It explains much of the context and history behind why things are done the way they are done and what good nix programs do to be good nix programs.

http://www.catb.org/esr/writings/taoup/html/

Stevens APUE is a much better choice.

Is this a good read after finishing Beginning Linux Programming (big red book by WROX) by Neil Matthew and Richard Stones?

This is a good write up for IPC related stuff - http://beej.us/guide/bgipc/output/html/singlepage/bgipc.html

It is somewhat helpful, but the examples for shared memory and mmap ignore concurrency issues and refer you to a generic, non-language specific WikiPedia page for guidance.

It seems many people dont like this book. Why's that?

why are all the chapters in separate pdf's? Is that unintentional or an enticement to buy the book when it comes out? If it's the former, anybody got a full pdf download link?

The first line in the table on http://advancedlinuxprogramming.com/alp-folder/ is a link to the PDF of the full book.

http://advancedlinuxprogramming.com/alp-folder/advanced-linu...

(The size in the table is incorrect. It's 3866012 bytes, not 1273361. The md5sum is correct.)

The size has now been corrected.

derp! Thanks for pointing that out!

pretty good book

If you are doing "Linux programming" instead of UNIX programming, you are most likely doing something wrong.

Using the higher performance Linux specific interfaces like epoll isn't doing it wrong, it is getting the most out of your platform. Perhaps it is doing it wrong to use it directly instead of a library in application code, but someone still has to know enough to write the library.

This sort of comment could be based on real knowledge, but it's hard to tell because you just gave us a conclusion rather than showing us how you came to it. A better comment would add information: give an example or two, tell a story, or say what's behind your thinking somehow.

Where can I find a "UNIX" distribution to try? :-)

Linux are in every android cell phones, PI, pc, etc.

z/OS is legally UNIX.

So's HP-UX and Solaris (probably not any of the Open Source variants, however).

None of the Open Source BSDs qualify as UNIX, however.

Buy a Mac, OS X is a certified UNIX.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.