Linux most commonly used command collation

Source: Internet
Author: User

Install the zip, unzip command
Yum install-y Unzip zip
Unzip the file

The Upzip suffix is

The tar zxvf suffix is

Show line Numbers

: Set Nu

VI Edit jump to how many rows

Method 1:
Enter : N, the delegate jumps to the nth row, such as: 79, jumps to line 79th.
Method 2:
Enter NG, which represents a jump to nth row, such as 79G, and jumps to line 79th.

Process

1. Check process
The PS command finds the PID number associated with the process:
PS A shows all programs under the current terminal, including other users ' programs.
Ps-a Show All Programs.
PS C shows the actual instruction name of each program when the program is listed, not including the path, parameter, or indication of the resident service.
Ps-e the effect of this parameter is the same as specifying the "A" parameter.
When you list a program, PS e displays the environment variables that are used by each program.
PS F Displays the tree structure with ASCII characters and expresses the relationship between the programs.
PS-H displays a tree structure that represents the inter-program relationship.
Ps-n shows all the programs except the ones that perform the PS command terminal.
PS s uses program signal format to display program status.
PS S lists programs, including interrupted sub-program data.
ps-t< Terminal number > Specify the terminal number, and list the status of the program belonging to the terminal.
PS U Displays the status of the program in a user-oriented format.
PS x shows all the programs, not the terminal to distinguish.

The most common method is PS aux, which is then filtered by the grep command to find a particular process and then operate on a particular process.
PS aux | grep program_filter_word,ps-ef |grep Tomcat

Ps-ef|grep java|grep-v grep shows all the Java processes and places the current grep process away.

2. Killing process
To end a process with the KILL command: Kill XXX
Freq used:kill-9 324
Linux also provides a killall command that directly uses the name of the process rather than the process identification number, for example: # killall-9 Name

3. Go to the path where the execution file of the process is located, execute the file./File name

1 pwd

Print working directory

Print work Path

2 ls

List short

Short display, show only file or directory name

3 LL

List Long

Long display, equivalent to ls-l, in addition to displaying files or directory names

Show file permissions, type, size, and more

4 wget

for download

5 mkdir

Make Directory

Used to create a directory

6 tar

For extracting/compressing files

Decompression: Tar zxvf xxx.tar.gz

Compression: Tar zcvf Xxx.tar.gz/path

7 Source

Make environment variables effective immediately

8 Touch

Create an empty file

9 CD

Chang Directory

Switch directories

Ten MV

Move

Used to move or rename files

Rm

Remove

Delete a file or directory

Groupadd/groupdel/groups

Groupadd: Creating User groups

Groupdel: Deleting a user group

Groups: Viewing the group to which the user belongs

Useradd/userdel/usermod

Useradd: Create User

Userdel: Deleting users

Usermod: Modify User

passwd

Modify User Password

chmod

Used to change file permissions

Chgrp

Used to change the group to which the file belongs

Chown

Used to change which user the file belongs to

Yum

Install Applications Online

Linux most commonly used command collation

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.