I want to learn the Linux file hierarchy and how the OS works at a deeper level. Are there any ebooks or webpages to learn that?
closed as too broad by Ramesh, jasonwryan, devnull, Patrick, Thomas Nyman May 14 '14 at 5:02
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. If this question can be reworded to fit the rules in the help center, please edit the question.
The Linux file/directory hierarchy is covered by the File Hierarchy Standard or FHS.
How the OS works at a "deeper" level is a far more complicated topic. In general the surface level are the user commands ... mostly those in the /bin and /usr/bin directories which are covered in the chapter 1 section of the man pages. The next level down are the standard library functions and interfaces (on the programming side) which are covered in chapter 3 on most UNIX systems (including Linux). The system level utilities are found in /sbin and /usr/sbin and covered by man chapter 8, and configuration files are stored in /etc and covered by manual pages in chapter 5.
The next lower level of detail would be the system call interface. That's covered by man pages in section/chapter two. System calls are functions in the kernel ... and the details for exactly how to call them are mostly covered by your C programming libraries (libc --- which are provided on must Linux systems in the form of glibc --- GNU lib for C).
The kernel itself is written in C but, as you might expect if you consider the "chicken-and-egg" issue, it is not linked against libc. So the kernel provides functions that the C libraries depend on. User space programs, such as the 'ls' command, your shell, any editors, and, in fact, the compilers and linkers used to turn source code into running programs, are all linked to these C libraries. (Also it's normal for C libraries to "wrap" system calls with their own implementations which have the same names as the system calls but provide some degree of portability, possibly adding some hooks for debugging, tracing, or error handling).
The deepest levels of detail are, of course, the kernel sources themselves. These document exactly what the kernel implements. For example if you want to see precisely the list of places and filenames the kernel attempts to find and execute as the "init" process you can see it in init/main.c
I participated briefly and casually in an effort, a few years ago, to organize a series of kernel source study sessions with some guided tours and lectures and create an online study guide for understanding them. Parts of this were documented on pages at Wikiversity: Reading the Linux Kernel Sources. There are still some useful discussions for getting the curious and self-motivated reader started. (However, you still need to be able to read C source code and perhaps understand some inline assembly to really study it).
The real question is just as the announcer will usually intones at those playing the limbo ... "How can you gooooo?"