Linux Command Format

Source: Internet
Author: User
Linux Command Format-general Linux technology-Linux technology and application information. For more information, see the following section. If you want to download the Linux shell Command tutorial, you can find it. Here, we don't talk about any commands, but you fully understand what commands are called in Linux and what rules it has.

It is necessary to learn about commands in Linux.

Familiar with writing commands

Linux provides hundreds of commands. Although these commands have different functions, their usage and rules are unified.

Common Linux Command FormatYes:
Command name [Option] [parameter 1] [parameter 2]……

1. The command name is composed of lowercase English letters, which is often the abbreviation of an English word or word that represents the corresponding function. For example, "date" indicates the date, "who" indicates who is in the system, and "cp" indicates the copy object.

2. Options are special definitions of commands. Starting with "-", multiple options can be connected with one, for example, "ls-l-a" is the same as "ls-la.

3. the command line parameters provide command running information or the file name used during command execution. A parameter is usually a file name that tells the command where the input can be obtained and where the output is delivered.

4. If no parameters are provided in the command line, the command receives data from the standard input file (that is, the keyboard) and the output result is displayed on the standard output file (that is, the display, the error message is displayed in the standard error output file (Display. You can use the redirection function to redirect these files.

5. After the command is executed normally, a value of 0 is returned, indicating that the execution is successful. If an error occurs during the command execution, all the work is not completed, returns a non-zero value (available variable $? In Shell? View ). In Shell scripts, the return values of commands can be used as part of the control logic.

6. The online help of the Linux operating system describes the accurate Syntax of each command. You can use the man command to obtain the online description of the corresponding command, such as "man ls ".

Please put this knowledge into your heart
Related Article

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.