10 steps for Linux Programming

Source: Internet
Author: User

I have been developing a Linux C language for a while, and I have summarized some experiences here. I believe that people who do not know Linux programming will gradually step into the Linux Hall. You are welcome to discuss any errors or inaccuracies.

1. Install the Linux operating system

To learn how to develop C language in Linux, it is necessary to install a Linux operating system. We recommend that you install ubuntu. This is the most user-friendly Linux operating system I have ever seen. For more information about how to use Ubuntu and how to develop it, see my other article for Ubuntu usage: http://download.csdn.net/source/2206289

2. Familiar with Linux commands

Linux provides a large number of commands that can effectively perform a large amount of work, such as disk operations, file access, directory operations, process management, and file permission settings. Therefore, operating on a Linux system requires the use of commands provided by the system. To really understand the Linux system, you must learn from the Linux commands and further understand the Linux system through basic command learning.

About Linux commands, welcome to refer to my blog previous article "Linux Command finishing": http://blog.csdn.net/sikinzen/archive/2010/04/19/5503769.aspx

3. Learn a source code editor

Many Daniel recommends tools such as Vim/Emacs, but I am still not used to them. It should be because I have not been able to use them. My personal favorite development method is: edit the code in windows and compile it in Linux.

I really like to use sourceinsight to edit code, the use of this tool can refer to my blog previous article "Source insight application skills, macro functions": http://blog.csdn.net/sikinzen/archive/2010/04/09/5468511.aspx

4. Understand GCC and GDB

Understand the basic usage of GCC and use GDB to debug the program.

5. Make good use of C Language

I found in my work that C language is common to everyone, but the core idea is not always understandable. In my opinion, I just touched the door and needed practical training.

Recommendation: C traps and defects, C expert programming, and C programming language.

6. Learn to write makefile and use it to organize source code

When the project is large, it is terrible to use command lines to compile one by one and link files one by one. At this time, make works. Even for small projects, I think make should also be used.

For more information about makefile, see the online article "Write Makefile with me" or "GNU make Chinese manual". Both articles are quite good.

7. Linux Application Programming

I finally got to the point.

On Linux, application programming is basically done in two books: APUE and UNP. The former exercises basic skills and the latter learns network programming.

Here, I will directly reference the comments of a certain online employee:

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.

8. Linux driver and kernel Programming
The driver has a high threshold. First, you must learn Linux application programming. At least you have read APUE.

I think there are at least two main tasks of driver programming: Understanding the concepts of Linux kernel frameworks and modules, and understanding the datasheet chip.

The first thing is to first learn to compile a test driver.

A typical tutorial is recommended: linux Device Driver.

In addition, there is a deep understanding of the Linux kernel.

The most important thing is to have an Embedded Board on hand for practice.

9. master a cvs Tool

If you do not understand cvs, go to baidu to search. Projects without cvs are prone to code loss and bug regression.

10. data structures and algorithms

Anyone who has basic computer courses knows that the program = Data Structure + algorithm. These two items are the foundation of programmers, just like the "internal strength" in martial arts novels ". If you have time, we recommend that you review these two parts. Recommended books: Algorithms in C and introduction to Algorithms

In fact, I have no right to speak about this small part. I write programs from automation and professional conversion, and I have never learned any data structures or algorithms. I am currently learning about it.

 

Postscript:

Through the above steps, I think it's okay to become a competent linux programmer. However, if I want to become an expert, I feel that I should also select a proper direction for myself and strive to move forward.

Let's work together!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.