Every Linux user should know the use how to kill process in Linux, which can stop unnecessary and more consume running processes in your system without shutdown the system.
When you are working in a Linux system, often system administrator has to face such a problem when the application and command run by you to use more system resources and you feel the system has hanged and You are unable to do anything in the system. In this situation, if you want to stop the commands and applications run by you, then you use the Linux kill command.
In today’s article, we are going to tell you about the most useful commands of Linux, which every Linux user should know. Linux has its own methods for starting and stopping the processes but sometimes, unfortunately, processes and applications can malfunction and do not allow themselves to stop, in which case the system needs to be terminated the Process forcefully. Well, Linux has its own way to close any program. In this article, we learn how to Kill a system’s running process without shutdown and restarting the system.
In Linux systems, only the root account has super administrative power, so only the root can kill all the processes in the system. If you want to run the kill command without root, then you have to add sudo before the command or get a root shell with su. Then execute the kill command.
Check Running Linux Processes
Before terminating a process in a Linux system, it is very important to know which process is using the most resources, or by which process you have not received the appropriate result, then for this, you should use the Linux top command. With this command of Linux, you can find all the processes running in the system with their PID, username, and how much memory and CPU are used by each process.
If you get to know about the process running in the system with the help of Linux top command, i.e. the process that has not yet responded and has consumed more system resources and you want to kill it, for that you have to press the k key and enter the PID of that process you want to kill. After the process is killed, press q to exit From the top command.
# top

Find the Process ID to Kill the Process
Before killing any process, you need to know about the process you want to kill. There are many ways to find the process ID in Linux. In the Linux system, you can find the process either by process ID or process name.
Use the PS command to Find The Process
The PS command also gives information about the process running in the system similar to the top command, but by this, you will not get the complete system running process like the top. You may have to use some options to get the complete result with the PS command. Most Linux system administrators or Linux users use the “-aux” option to get sufficient results with the ps command.

- -a: with the help of this option, you can view the all-user process instead of the current login user.
- -u: you can get the complete information about all running processes in the system
- -x: when you run the ps command with this option system shows all the processes are controlled not by users but by daemons.
on the screen below You can see the result obtained by using the -aux option with the ps commandÂ
ps <options> ps -aux
There are many ways to kill the running process in the Linux system, out of which you know about killing the process by username and process id. If you are not able to find out the process id and process name that was running in the system, then in this case you can kill the process according to the previous time period.
Use Killall command in linux
The killall command is used to kill the running processes in the system by name. By default, the killall command sends a SIGTERM signal to the system. with the help of killall command you can kill the multiple processes at a time with a single command,
killall <process>
with the killall command you can kill the process running in the system by name and PID, you can also kill the process running in the system according to the time of its execution.
Like you are not able to know which process is running in the system which using more system resources and causing the system to hang or not performing well, but you have an idea that the system is running properly for the last 30 minutes And if there is any problem in the system due to the process running in the system during this time period, then for this you can kill all the processes running from last 30 minutes with killall command.
-o. with the help of this option, you can kill the all running process that has been running for more than that amount of time.-y. with the help of this option, you can kill all system running process that has been running for less than that amount of time.
#killall <process> #killall -o 30m #killall -o 30m
The killall -o 30m command will kill all the running processes in the system that are older than 30 minutes, while the killall -y 30m command will kill all the running processes in the system that are less than 30 minutes old.
how to kill a process in Linux
If you know the process ID of the process running in the system and want to kill it, then for this you have to enter the name of that process id before the kill command. With the kill command, you can kill only one process id at a time and this command will send a SIGTERM signal to the system that indicates a process to stop.
kill <processID> kill 1623

kill -9 Linux Command
If you want to forcefully shut down the service running in the system, then for this you should use the -9 option with the kill command. The kill -9 command is to send a SIGKILL signal to the system that indicates the immediate termination of the system’s process. But by killing the process running in the system with this command, you can face some issues because in this process the system terminates the process immediately, due to which there is a possibility of a loss of unsaved data.
kill -9 <processID>

Conclusion
In this article, we learned about how to kill the process in a Linux system. Every Linux user should know the use of this command, which can stop unnecessary processes running in your system and system slowness. With this command, you can easily stop any process and you will not even need to shutdown and restart the system.
Comment below for any kind of feedback related to this article. For more such information, subscribe to our other blog, simiservice.com, from where you can get technology news and new product information.
- Top 20 Highest Salary Jobs : Lucrative Careers with Best Salaries - 5 April 2025
- Types of Operating System (OS): Features,Types And Uses - 5 April 2025
- 15 Features of Operating System You Should Know - 4 April 2025



