Linux Command Learning Article 0--origin

Source: Internet
Author: User

Yesterday when using curl to send a simple HTTP request to do a test, I found that each time you use the network to see other people's demonstration sample talent remembered how to use, so inefficient. Although the network is still in, but the total feeling is not to be mastered by themselves, the heart is not practical, recalled that their own use of Linux almost the same three or four years. From the very beginning of contact is a book with a basic Linux tutorial (not the brother of the bird). It starts with a variety of Linux commands, some knowledge of simple shell programming. But at that time only mastered a number of frequently used commands. For most commands or when you are using them, you may be afraid of or bored with your English documents. In the process of viewing through the man command, it is always not possible to master the use of one command. However, one of the parameters of the command is used in the future. In fact, there may be a second, simpler and more effective solution, which is completely unknown.


In view the above questions. I think there is still a need to calm down to learn about the often used Linux commands, so later to say "familiar with the Linux operating system" (of course, this sentence is not only a few commands to be able to) when the heart of the more emboldened. In addition, let yourself be able to collect some of the debris time. Insist on doing one thing. Exercise your own insistence on one thing, which is the most lacking.


Linux There are hundreds of orders, and we often use those dozens of. First of all, from the beginning of these dozens of, the main reference to the description of the man command, so by the way can exercise their own English document reading ability, each command as far as possible through the example of the use of each reference and the use of the combination. Of course, some commands can be complicated. Need a period of time to learn talent real thoroughly understand, but now time is enough. Collect the debris time and just stick to it. can certainly prevail.


Linux commands are generally stored in/usr/local/sbin,/usr/local/bin,/usr/sbin,/usr/bin,/sbin,/bin these folders, we generally do not need to enter the absolute path of the command. It is possible to enter only the command name, which is due to the configuration of the path based on the environment variable in the shell (often used by bash). Find out if there is an input command in the folder under all path, assuming that the file is present, if it does not exist then the error is:-bash:ls: Without that file or folder, we are able to view the running file of the command by following the commands of the which command in detail in that folder. For example which LS output/bin/ls.


in fact Each command is just a Linux executable file, this executable can be binary files, script files, etc., when we run them and run some of the programs we compiled after the connection is complete, for the script file we can view the contents of the file to see the detailed running process, A binary file is usually a binary file in elf format, similar to the executable file generated by the program compiled by the C language. The ability to track the system calls used during a command run through the strace command is a great way to analyze the problem. When we start running a command, in fact we are in the context of another process, which is the bash process we use, which is always waiting for the user's input. Then, based on the first parameter of the input command line from path (assuming that only one of the parameter names will be looked up from path, assuming that either absolute or relative paths are found based on the current path), it is assumed that a new process (exec system call) is started. This child process runs the command, and the bash process decides whether to wait for the child process to run, depending on whether the command is running later.


All right. , after the introduction of the above is a comprehensive study of the Linux Prelude command, and then carefully study each command, adhere to.

Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

Linux Command Learning Article 0--origin

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.