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

How to end the process in linux

王林
Release: 2020-05-14 09:46:29
Original
5232 people have browsed it

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 ***
Copy after login

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
Copy after login

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

kill -9 14992
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template