Lập Trình Linux

How to kill Process in Linux

Learn how to kill processes in Linux. Find out the command required to kill a process via the terminal application

Don’t forget to check out our site for more free how-to videos!
– our feed
– join us on facebook
– our group in Google+

In this tutorial, we will guide you on how to kill a process in Linux. On your computer system, you may have several processes running in the background. Some might be active while the others might be in sleeping mode (inactive). You might want to kill a specific process in linux because it might be wasting too many system resources. In this tutorial, we will teach you how to kill a process in linux by using the terminal application.

Step 1 — View process tree in terminal
First of all, open the terminal. With the terminal application opened up, let’s view the entire process tree. In order to do so, type in the “pstree” command and hit the enter key.

Step 2 — Use the top command
With that done, let’s use the “top” command to see the top running process along with their process ID.

Step 3 — Linux “kill process” command
To kill a process, you will first have to note down the process id. The process id is important for the linux kill command. For example, we might want to kill the gnome-terminal process. The linux kill command for the gnome-terminal process would be “kill 7381”. Type it in and then hit the enter key.
This will automatically kill the process and close the terminal application.


Công Nghệ
Angular 6 development Environment set up Angular 6 video tutorials part 1
Bruno Fernandes 2019 ● Amazing Skills & Goals | HD
Bệnh nhân 34 ở Bình Thuận đi khác chuyến VN0054, có nguồn lây mới | Bản tin virus corona 10.3.2020
  • Who is reading kali book

  • Tysm works on raspberry pi too

  • LavosLavos

    Author Reply

    shove that terminal up your ass, you linux elitist always tell us to open that fucking terminal for everything. You can't use the terminal when you have a frozen game and black screen in front of your face. Windows uses alt+cntl+Del to get to the task manager to kill it or alt+f4. why does linux always fucking tells us to do everything on the terminal, just fucking tell us a shortcut key.

  • ps -ef works the same way

  • Yes and you might add how to kill a terminal when "top" splits the terminal window and the command line disappears.
    If you fiddle around enough, you may eventually see a command line at the top of the listings but even then when you do enter a command such as kill "PID" or "exit", the system returns an error "unaceptable integer".
    At this point, if the computer isn't locked, enter Ctrl-Shift-Q to close the terminal.
    Clicking the "X" at the top right corner of the terminal may also work.

  • i like fast you save me time brah

  • Too fast but it was helpful