Home  >  Article  >  Operation and Maintenance  >  How to end the process in linux

How to end the process in linux

王林
王林Original
2020-05-14 09:46:295121browse

How to end the process in linux

1. Positioning process

The positioning process can use the top command or the ps command, as follows:

1. The top command

can dynamically view the overall operation of the system in real time. It is a practical tool that integrates multi-party information monitoring system performance and operation information.

After entering top, you can see the following interface, which displays the process status in real time.

How to end the process in linux

#2. The ps command

is used to report the process status of the current system. This command is often used with grep to filter the output results. The commonly used structure is:

ps -aux | grep ***

2. End the process

We can use the name of the process and the process ID (PID) to end process.

End command:

kill: End the process by process ID

killall: End the process by process name

The most commonly used signal to end the process Is:

How to end the process in linux

#We can replace the name of the signal by the value of Single Value.

Example:

For example, if we want to kill the python process:

kill SIGNAL PID

SIGNAL is the signal to be sent, and PID is the process number.

kill -9 14992

The above command is to kill the python process. If there are multiple python programs running and you want to end them all, you can

killall -9 python

Recommended tutorial: linux tutorial

The above is the detailed content of How to end the process in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn