62

I've worked on *nix environments for the last four years as a application developer (mostly in C).

Please suggest some books/blogs etc. for improving my *nix internals knowledge.

5
  • 1
    with your experience only reading kernel source would help .)
    – Eimantas
    Commented Aug 10, 2010 at 20:06
  • 3
    RTFS is always best, but sometimes a little lite reading makes the source a little easier to understand. Commented Aug 10, 2010 at 20:11
  • Someone who has editing privileges really ought to edit that title.
    – jjclarkson
    Commented Aug 16, 2010 at 22:31
  • 1
    I am currently following Matt Might's advice in his article, What Every Computer Science Major Should Know. He recommended The Unix Programming Environment by Kernighan and Pike, Linux Server Hacks, UNIX and Linux System Administration Handbook by Nemeth, Synder, Hein and Whaley, Linux Kernel Development by Love, and Unix Network Programming by Stevens, Fenner and Rudoff.
    – Anthony
    Commented Aug 5, 2012 at 2:34
  • 1
    @Anthony, those are excellent resources, but more oriented to the userland/command line. Also, particularly Linux is changing very fast right now, you'd need to keep up to date. Nice resources are LWN and kernelnewbies.
    – vonbrand
    Commented Mar 15, 2013 at 14:05

11 Answers 11

36

Here are some suggestions on how to understand the "spirit" of Unix, in addition to the fine recommendations that have been done in the previous posts:

  • "The Unix Programming Environment" by Kernighan and Pike: an old book, but it shows the essence of the Unix environment. It will also help you become an effective shell user.

  • "Unix for the Impatient" is a useful resource to learn to navigate the Unix environment. One of my favorites.

If you want to become a power user, there is nothing better than O'Reilly's "Unix Power Tools" which consists of the collective tips and tricks from Unix professionals.

Another book that I have not seen mentioned that is a fun light and education reading is the "Operating Systems, Design and Implementation", the book from Andy Tanenbaum that included the source code for a complete Unix operating system in 12k lines of code.

3
  • 15
    why is a book with 864 pages called anything "for the impatient"?
    – amphibient
    Commented Mar 15, 2013 at 15:39
  • 18
    @amphibient I take it you haven't seen the "for the patient" edition. Commented Oct 5, 2013 at 21:59
  • 3
    This isn't "internals"....
    – user997112
    Commented Apr 12, 2014 at 20:27
22

You definitely want to read Advanced Programming in the Unix Environment by Stevens. Don't let the Advanced title scare you away, its very readable.

1
15
1
  • 3
    +1 for the Lions book. MIT's xv6 is modern version of Lions v6 that runs on x86 machines and uses ANSI C. Both source code and associated textbook can be downloaded. Commented Nov 16, 2012 at 11:19
9

Books/sites/manuals that I am using frequently:

  • The Linux Kernel: This book is published online as a part of TLDP (The Linux Documentation Project). It is not up-to-date and not an internal manual, but provides useful information and introductory materials about principles and mechanisms of the kernel.

  • Understanding Linux Kernel: IMHO, it is the best book for beginners who has background about the operating systems' design and concept. It is accepted as up-to-date, covers version 2.6 of the kernel. There is an HTML version of the book on the web, but I think it is most probably warez.

  • Some book about virtual memory management

While studying linux kernel internals, you usually need to learn how hardware works and what hardware provides in abstract manner. Intel has great manuals for this.

If you need to study about operating systems' design and concept, I suggest following book: Operating System Concepts.

2
  • 1
    There is another book about virtual memory manager of linux. It includes source code explanations. URL: ptgmedia.pearsoncmg.com/images/0131453483/downloads/… (Legal to download)
    – dirtybit
    Commented Aug 10, 2010 at 21:05
  • +1. book on "virtual memory manager" ?? seems very interesting. thanks :-).
    – Hemant
    Commented Aug 24, 2010 at 6:37
7

O'REILLY Linux Kernel in a Nutshell
and O'REILLY Linux Device Drivers

1
  • 3
    Linux kernel in a nutshell is about how to build and install the kernel, not really about the internals of Linux/Unix. Not to say it's not a good book, but I'm a bit biased. Oh, both of these books are free online if you want to look at them there.
    – Greg KH
    Commented Aug 10, 2010 at 21:54
5

Linux Systems Programming or any other book by Robert Love (these are all O'Reilly books):

http://oreilly.com/catalog/9780596009588

0
3

I agree with all the others and I have to say that Stevens' APUE (I have the second edition) is a classic. I would also like to add that Eric Raymond's The Art of UNIX Programming ranks right up there with Stevens on my list.

0
2

Well, for BSD Unices, there's The Design and Implementation of the 4.4BSD Operating System, parts of which are now apparently available for free at http://www.freebsd.org/doc/en/books/design-44bsd/

2

Linux Device Drivers is another good resource. It would give you another way to get into the inner workings. From the preface:

This is, on the surface, a book about writing device drivers for the Linux system. That is a worthy goal, of course; the flow of new hardware products is not likely to slow down anytime soon, and somebody is going to have to make all those new gadgets work with Linux. But this book is also about how the Linux kernel works and how to adapt its workings to your needs or interests. Linux is an open system; with this book, we hope, it is more open and accessible to a larger community of developers.

2

May I suggest the following two books as well (besides the others):

I have referred the first one extensively (If i had better memory, and had more time, I would know a lot more than I do now; but that's another story). I am currently reading the second one.

1

To get a sense of the why and what the kernel is meant to support, have a look at The Art of Unix Programming by Eric Raymond. It takes things at a fairly high, philosophical level, but it would go well with the nitty-gritty details of other books.

Not the answer you're looking for? Browse other questions tagged .