Kill a Process with the Help of pgrep
Command:
Here pgrep can be used to go through all processes and match the ones with the given pattern. This way we can easily get the pid of the process and kill it effectively.
Here we don’t want to kill the important process so we will only kill the two processes with their pid
kill 355
How to Kill Processes by Given Partial Names in Linux
On a Unix system creates a separate environment for a program when it is executed. Everything the system needs to run the program as if there were no other programs in this environment. In Unix, each command you issue initiates or starts a new process. You initiated a process using the ls command to list the directory contents.
Simply put, a process is a running program instance. pkill is a utility, preinstalled on most Linux systems, used to terminate processes from the terminal. Processes can be killed using various attributes including partial names. Partial names, snippets, and patterns can surely be used to terminate a process on a Linux machine however it may backfire to kill processes without their unique id. pkill is a powerful command that can terminate/kill processes.
Contact Us