type Specific functions of each command
File directory operation The ls command: View the files contained in the Linux folder, file permissions, and directory information.

The CD command: the most basic command statement, other commands are based on the use of CD command, used to switch the current directory to dirName;

The PWD command: View “Current working directory”The full path;

The mkdir command: the directory used to create the specified name, requiredcreateThe user of the directory has the write permission in the current directory, and the specified directory name cannot be an existing directory in the current directory.

The rm command: Deletes one or more files or directories in a directory. If the -r option is not used, rm is usedDirectories will not be deleted. If you use RM to delete a file, you can usually restore the file.

Rmdir commands: This command is used to delete one or more subdirectory items from a directory. When deleting a directory, you must have the write permission on the parent directory.

The mv command:(move (rename) files) can be usedmobileA file orrenameFile. When the second argument type is a file, the mv command completes the file renaming. If the second parameter is an existing directory name, multiple source files or directories can be specified. The mv command moves all the specified source files to the destination directory.

The cp command: will the source filecopyTo a target file, or copy multiple source files to a target directory;

Touch command:To change theOf a document or directoryDate/time, including access time and change time;

The cat command: used to display file contents/concatenate several files to display/read content from standard input and display. It is often used with redirection symbols;

The nl command: Output file content is automaticAdd a line number! The default result is a little different from cat-n. Nl can do a lot more with line numbers, including the number of digits and whether to auto-complete zeros and so on

More ordersThe: more command can view the contents of a file, but the more command can view the contents of a fileView by pageFile content is also supportedJump straight to another careerThe function such as;

Use less: Less is similar to more, but less can be usedBrowsing documents, more can only move forward, but not backward, and less does not load the entire file before viewing it;

A head command: used to display the beginning of the file to standard output. The default head command prints the first 10 lines of the corresponding file.

Tail command: Displays the content at the end of a specified file. If no file is specified, the file is processed as input information. The commonly usedSee the logFile;

File search Which commandIn the PATH specified by the PATH variable,searchA system commandlocation, and returns the first search result;

Whereis command:positioningThe location of executable files, source files, and help files in the file system;

The locate command: A quick search to see if there is a specified file in the system;

The find command: Traverses down the file hierarchy to match the desired files and perform corresponding operations

File package upload and download The tar command:The compressionandUnpack theFile. Tar does not compress itself. It is implemented by calling the compression function.

Gzip command: use a wide range of compression programs, after the file compression, its name will be more than the extension “.gz”;

File Permission Settings The chmod command: used to change Linux system files or directoriesAccess permissions;

The CHGRP command: You can change the owning group of a file or directory by using the group name or group id.

Chown command: change the owner and group of a file by chown.

Disk storage The df command: displayThe specifieddisk-fileAvailable space;

Du command:According toDisk for each file and directoryUse the space;

Performance monitoring and optimization The top command: Displays the current systemBeing performedProcess information, including the process ID, memory usage, and CPU usage.

The free command: Display systemuseandfreeIncluding physical memory, interactive area memory (SWAP), and kernel buffer memory

The vmstat command: used to displayVirtual memoryThe information;

Lostat command: View the activity and load information of cpus, network cards, TTY devices, disks, AND CD-RoMs.

The lsof command: View the file that your process opens, the process that opens the file, and the port that the process opens (TCP, UDP).

The network command Ipconfig command: View and configureNetwork equipment;

The route commandCreate a static route to specify a host or network through a network interface, such as eth0.

The ping command: Determine the status of the network and each external host; Tracking and isolating hardware and software problems; Test, evaluate and manage networks;

Traceroute command:trackingRoute for network packets. The preset packet size is 40Bytes, which can be set separately.

The netstat command: Displays statistics related to IP, TCP, UDP, and ICMP protocols to check the network connection status of each port on the host.

Telstat command: Start the terminal stage and log in to the remote host;

Other commands Ln command: creates a synchronous link for a file in another location. When we need in different directories, use the same file, we don’t need to put in every need directory a file must be the same, we just in a fixed directory, put the file, and then in the other directory with the ln command links (link) it can be, don’t have to repeat the take up disk space;

The diff command:To compareContents of a single file or directory;

The grep commandWith a strongThe text searchA tool that searches text using regular expressions and prints out matching lines;

Wc command:; Displays the number of lines, words, and bytes contained in the file

The ps command: used to displayThe current processThe state;

Watch command: Outputs the command output to the standard output device, which is used to execute commands periodically or regularly.

The at command: Executes a specified task only once at a specified time. (The ATD process needs to be started);

Crontab command: Executes specified system commands or shell scripts at fixed intervals. The unit of time interval can be any combination of minutes, hours, days, months, weeks or more. (Crond service must be enabled);

Command parameters and use examples of 45 common Linux command, let you easily play Linux or Linux common command learning – novice tutorial or 27 common Linux command – simple book