Linux operation command Accumulation

Source: Internet
Author: User

Linux operation command Accumulation

In Linux/UNIX, users often use text interfaces to set up systems or operating systems. The author is constantly working on these commands, therefore, this article has been specially developed, prepared, and started. This article mainly records some of the operating commands you encounter in Linux/UNIX at ordinary times, record and sort them out, one can deepen your impression, and the other can be recorded and shared. We hope that you will give instructions and explanations on inappropriate or ambiguous aspects so that you can learn and improve them together.
[For more information, see http://blog.csdn.net/mahoking]

Linux Command Format

1. Linux Command Format: Command word [Command Options] [command parameters]
Command [Option] [parameter]
(1) The command word is the command name. The command word used on the linux command line interface uniquely identifies a command.
(2) Command Options: the number and content of options vary depending on the command. Depending on the command function to be implemented, the number and content of options are also different.

Command options can be used in combination. Command Options include short and long formats. The short format is a single English letter. The option is to start with the "-" symbol (half-width minus sign ).

Option. Letters can be in upper or lower case. Such as ls-al. Command Options in long format are represented by English words, and guided by "--" (two halfwidth minus signs) before the option

. For example, -- abc -- xyz.
2. command words, command options, and command parameters are separated by spaces.

001 Linux cd Command [Change Directory]

1 Command Format
Cd [directory name] format: cd dirName
2. command functions
Switch the current directory to the dirName directory
3 common examples
Example 01
Command: cd/
Input:
[Root @ localhost root] # cd/
Note: Go to the system root directory. The current directory is already in the system root directory.
Example 02
Command: cd... or cd ..//
Input:
[Root @ localhost root] # cd ..
Returns to the parent directory.
Example 03
Command: cd/opt/soft/
Input:
[Root @ localhost root] # cd/opt/soft/
Jump to the specified directory/opt/soft/
[Note]
[Root @ localhost soft] # pwd
/Opt/soft
Description: displays the full directory of this directory.
Pwd: print work directory print the absolute path of the current working directory

002 Linux ls command [list]

1 Command Format
Li [option] [Directory] format cd [option] dirName
2. command functions
List file information (current directory by default)
3 common examples
Example 01
Command: ls
Input:
[Root @ localhost root] # ls
Note:
Display files and directories in the current directory (excluding hidden files)
Example 02
Command: ls-
Input:
[Root @ localhost root] # ls-
Note:
Lists All files in the current directory or specified directory, including files starting with dot (.) And. directories and. directories.
Example 03
Command: ls-l
Input:
[Root @ localhost root] # ls-l
Note:
List detailed information about files or subdirectories in the current directory or specified directory

003 Linux su command [switch user]

1 Command Format
Su [option] [user] format cd [option] [user]
2. command functions
Switch user
3 common examples
Example 01
Command: su newusr
Input:
[Root @ localhost root] # su newusr
Note:
Change to another user's identity. Except root, you need to enter the user's password.

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.