I recently used my spare time to read the Unix/Linux Programming Practice tutorial. The original book is called understanding Unix/Linux programming: A Guide to theory and practice. I feel that this book is still good. The Unix/Linux system programming is mainly explained by the commands on the UNIX system.ProgramHow to implement it to analyze the UNIX system principles and system programming. For example, it explains how to use commands such as WHO, CP, ls, and PWD in unix c. Through this explanation, we not only learned how to program Unix systems, but also learned some principles of UNIX operating systems. I think it is very good.
So what do we need to learn about system programming in Unix/Linux? After reading this book, I want to learn the following content:
1. Basic C language programming in Unix/Linux, including the use of basic editing tools, Vim, emacs, and other compilation and debugging tools, such as GCC and GDB, and the use of basic commands in UNIX systems and the basic syntax of C language. That is to say, you must be able to use development tools to write the most basicC LanguageProgram.
2.File read/write(Read, write, close, and understanding of file descriptors and file attributes), directory operations, and C library functions that correspond to these system calls.
3. Device Control (in UNIX, the device operates as a file and provides the same operation interface as the file ). I/O redirection.
4. Signal mechanism (signal ).
5.Process Creation and execution(Fork, exec, exit, wait, pipe, etc.), communication between processes (IPC: File/name pipeline/shared memory/socket/semaphore)
6.Thread usage(Pthread_create, pthread_join, pthread_mutex_lock, pthread_mutex_unlock, pthread_cond_wait, pthread_cond_signal)
7.Socket network programming. (Socket, bind, listen, accept, sendto, recvfrom), understand the network programming model. (Synchronous and asynchronous I/O)
This knowledge is not only about learning these systems or function calls, but also about understanding their programming models. Then, we developed it based on the actual needs. Most of the time, solutions to actual problems are more important than these things, but these basic knowledge is essential for your development.
Finally, we recommend that you read this book if you want to learn Unix or Linux programming. In addition, if you want to develop applications, you can learn more about GUI development (GTK ++ or QT ).