Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the ways to end the process with linux?

Shulou Source: shulou.com Published: 2022-06-03 06:19:33 09月14日 Update

This article is to share with you the method of ending the process of linux. I believe most people do not know how to end the process. In order to let you learn, I have summed up the following contents. Without saying much, let's read on.

I. Positioning process

The positioning process can use either the top command or the ps command, as shown below:

1. Top command

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

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

2. Ps command

Used to report the process status of the current system. This command is often combined with grep to filter the output results, and the common structure is:

Ps-aux | grep *

II. End the process

We can end the process by its name and its ID (PID).

End the command:

Kill: terminates a process through the process ID

Killall: terminates a process by its name

The most commonly used signal to end a process is:

We can replace the name of the signal with the value of Single Value.

For 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

After reading the above, have you mastered the method of linux to end the process? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Processes commands signals content names systems runs methods information can be passed real-time situation more positioning practical dynamic multiple most utilities that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information NVidia MySQL Xiaomi Docker