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 with ASCII
Characters display a tree structure, expressing the relationship between 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 piped using grep
The command filter finds a specific process and then operates on a specific process.
Ps-a-o stat,ppid,pid,cmd |grep-e "^[zz]"//View specific processes first
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. The initiation Process
Go to the path where the execution file of the process is located and execute the file./File name
Check, kill, start the process