Assume that you are from a computer science class. You have completed all the basic courses of the Computer Science Department, such as data structure, operating system, architecture, compilation principle, and computer network.
I think it can be divided into four stages, from low to high.
From installation and use => common Linux commands => Linux system programming => kernel development, read the kernel source code
When learning common Linux commands, you must learn to compile the kernel, optimize the system, and adjust parameters.
There are too many installation and frequently-used command books. If you want to find this book in a little more details, you need to learn regular expressions.
Advanced UNIX environment programming is recommended for system programming.
And UNIX network programming.
At this time, you may also need to read the materials to understand the ELF File Format, connectors and loaders. It is better to name a CMU textbook in Chinese as "Understanding the computer system in depth ".
For kernel development, read the kernel source code stage and start with the write driver to gradually develop the Linux kernel.
The reference book is Linux device drivers, which is called LDD.
Linux Kernel Development
Understading the Linux kernel, which is called utlk
Linux source code Scenario Analysis
These four books are essential books for kernel development.
Finally, the third and fourth stages are the most important. It is useless to give blank words, and reading is not covered.
How to Learn Linux/Unix programming methods
Recommended learning path:
First, learn the editor, Vim, emacs, and anything.
Then, learn to make file. You only need to know a bit, so that you can prepare the program.
Then let's take a look at "C programming language" K & R. In this way, we can basically perform general programming. By the way, let's look at this data structure book.
If you want to learn Unix/Linux programming, apue is a classic teaching material. Learn more about unp. In this way, you can master the system.
Then look at douglus E. comer's "using TCP/IP for Internet connection" Volume 1, learn about the network, and then read the first volume of "UNP", not only learn network programming, in addition, I am very familiar with some common techniques of system programming. If you continue network programming, we recommend that you read the third volume of "TCP/IP for Internet interconnection, there are a lot of programming about the application protocol telnet, FTP and other protocols.
If you want to write a device driver, first you must be familiar with the system programming interfaces such as files and IPC, and then learn "LDD" 2.
Comments on several classic textbooks:
The C program design textbook K & R is the inventor of C language. Although it is a bit old, I often flip through a necessary manual. The length is relatively small, but every time you read it, you will get it again. It can also be replaced by Tan haoqiang's C language programming.
Advanced programing in UNIX envirement W. Richard Steven S: it's also a very classic book (nonsense, but it's not a classic of the Steven s book !), Although it can be viewed by beginners, it is actually an auxiliary document in UNIX Network programing. The Chinese Translation of "Advanced Programming in UNIX environment" is not very good. Now there is a photoplate, it is easier to directly read English than to read Chinese.
UNIX Network programing W. richard Steven s: the first volume is about BSD Socket network programming interface and another network programming interface, but now we usually use BSD socket, so this book only needs to read about half of it. The second volume is not designed for the network, mainly for inter-process communication and POSIX Threads. After reading apue, you can read it. Basically, the system is summarized by apue and UNP vol2. After reading UNP, you will know the vast majority of programming skills in system programming, even if the first volume is about network programming. In China, Tsinghua translated "UNIX network programming", with a high level of skills and good translation skills. We recommend that you read the Chinese version.
There are three volumes of TCP/IP xiangjie, namely, the Protocol, the implementation, and the programming application. I have not read it ., But it is also said that it is classic, because I do not have time to read the second, so it is inconvenient to comment.
"Using TCP/IP for Internet connection" douglus. E. Comer consists of three volumes: principle, implementation, and advanced protocol. It seems that this set is better than the set of Steven s, and even Steven s has to admit that its first volume is very classic. In fact, even if you do not have any knowledge about the network, you will be familiar with the network in the future. There are also a lot of exercises designed to be classic and practical in the first paper, because the author is a teacher and a foreign graduate student's teaching material. There is no answer to the exercises, which is left for readers to think about, because the answers to these questions can make you an intermediate hacker. The answers to these questions can be obtained by douglus, however, I don't know how to read this document only for the instructor. I can use this document as a reference manual. The examples are also classic. If you have read the source code of qterm, you will know that the Telnet Implementation of qterm is mostly from the source code of this book. For the book on Network principles, I recommend it, instead of Steven S's explanation of TCP/IP.
Operating System-Design and implement is an example of the operating system. The author's mother tongue is not English, so the English looks rather obscure. The Chinese translation is "Operating System Design and Implementation". I have never read the Chinese version, because the translator is Yu jinyuan, and his translation of "apue" has left me disappointed. After reading this book, how can the underlying operating system work?
Have a clear understanding.
"Linux Device Driver" 2E is one of the few good books about Linux device drivers. However, the content is a bit messy. If you do not have some writing-driven experience, you will not be able to touch the north and south for the first time. In China, I translated the second edition of Linux driver, the first edition, and the second edition. However, although the second edition is somewhat unsatisfactory, however, compared with the first version, it has already exceeded a large margin. To read this book, you should at least find some books about computer principles and computer architecture. At least you should have some knowledge about the hardware and computer processes.