- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to find and kill running processes in linux
Do you think Linux computers will automatically handle process by itself? Sometimes administrators need to handle processes. Process management is one of the important aspects for Linux administrators. This article describes”How to find and kill running processes in Linux”.
Linux creates a process whenever a program is opened, either by the user or by Linux. This process contains information about “how a program is running”. When a process or application is opened , it keeps on changing from one state to another and it usually stays in either of the following states –
Running State – It means the process is executing or set to be executed.
Waiting State –It means the process is waiting for the system event.
The waiting process is interpreted by signals called as Interruptible and the waiting process is directly reflected on hardware condition called as Uninterruptible. The waiting/killing stages should be one of the following –
Stopped State – It means the process has been stopped by the signal.
Zombie State – It means the process has been stopped abruptly and is dead.
Finding Process PID
To find the process PID of application, use pidof command as shown below –
$ pidof bash
The sample output should be like this –
$ pidof bash 12627
To kill a process, use kill command as shown below-
$ kill 12627(process PID)
You can also send a named signal to the process by using the signal name or numbers as follows –
$ pidof vlc 14778 $ kill -SIGTERM 14778 $ pidof vlc
Using the signal number to kill a process as shown below-
$ pidof vlc 15046 $ kill -9 15046 $ pidof vlc
In the above command 9 is the signal number for the SIGKILL signal.
Killing Multiple Process PID’s
To kill multiple process PID’s, use the following process –
$ pidof firefox 15458 $ pidof vlc 15117 $ kill -9 15458 15117
Congratulations! Now, you know “How to Find and Kill Running Processes in Linux”. We’ll learn more about these types of commands in our next Linux post. Keep reading!
- Related Articles
- How to Kill Linux Processes Using ‘xkill’ Command
- How to Find the List of Daemon Processes and Zombie Processes in Linux
- Kill Commands In Linux
- How to Kill a Process by Name in Linux?
- Zombie and Orphan Processes in Linux
- How to find out which processes are using swap space in Linux?
- How do I kill all the processes in MySQL “show processlist”?
- Managing Processes in Linux
- How to Kill a Detached screen Session on Linux
- Threads vs Processes in Linux
- Kill a process running on a specific port?
- How to list running screen sessions on Linux?
- How to show historical and statistical running time of linux systems
- How to get the running processes with the WMI object using PowerShell?
- How to get the running processes with the CIM instance using PowerShell?