ubuntu view process pid and knot Bundle No Response program
Occasionally, in a Windows system, the program does not respond to the situation, we all know that the use of shortcut keys Ctrl+alt+del Pull Task Manager, and then end the unresponsive process is OK. But how do you force the shutdown of an unresponsive program in an Ubuntu system? Today's concrete to summarize the study.
PID: Process identifier, the system assigns a recognition code to each process, called PID. First, view the process and PID
1, with Ctrl+shift+t to pull out the terminal terminal, input top, the display is now the process of the system, according to the consumption of resources from more to less arranged to find the process to shut down the process, the first column of the PID number.
2, in the terminal, Input PS command to view the process and the corresponding PID.
PS commands are most commonly used to display process information, and parameters can be omitted:
-aux the BSD-style display process used
-EFH shows processes in System V style
-E,-A shows all processes
A shows the process for all users on the terminal
X shows no terminal process
U Show Details
F Tree-like display
W Full Display information
L Display long lists
For example: In the terminal input: PS aux
The meaning of each column output field:
3, Pstree
Tree Display process Information
-A display full command and parameters
-C Repeat processes are displayed separately
-c Display Process ID PID
-N Arrange processes by PID
4, Pgrep < process name >
The tree displays information for the specified process, with the following parameters:
-A display full command and parameters
-C Repeat processes are displayed separately
-c Display Process ID PID
-N Arrange process two by PID terminate process
The command to end the process is Xkill, kill, Pkill, Killall, etc.: 1, Xkill
Xkill, a program that kills graphical interfaces on the desktop, is installed by default on Ubuntu, so no reinstallation is required. In the terminal input Xkill, at this point the cursor will become a fork (press right button can be canceled), in the unresponsive program interface point, you can terminate the process.
Note: The fork does not point to the terminal or system interface, or the system process is terminated. 2. Kill <pid>
From the previous content, first look at the process to shut down and the corresponding PID. Then enter sudo kill PID at the terminal. The KILL command has a number of parameter options, including:
kill-9 PID #用来强制终止指定pid进程 (recommended using this method)
Kill-9-1 #终止你拥有的全部进程3, Pkill < process name >
For example: In the terminal input: Pkill Firefox can be closed Firefox browser. 4, Killall < process name >
The killall command kills all processes within the same process group. It allows you to specify the name of the process to terminate, not the PID. Similar to the Pkill.
If you want to kill a single process, or use kill better.