A Guide to Kill, Pkill and Killall Commands to Terminate a Process in Linux

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

38 Responses

  1. as says:

    Kill isn’t for kill processes. Kill is for send signals to other processes.
    And no, there is no relationship between uptime and the kill/pkill/etc commands. Most software has a standard start/stop procedure, some of them use kill, but others not.

  2. Gordon says:

    Thanks. It was a helpful information.

  3. Dave says:

    Hey @oke deh, the output of your ‘ps‘ command is showing the ‘grep‘ command, not a process called ‘vnc‘.

    By the time you run the kill command, the grep has completed and so the process id no longer exists, so you can’t kill it.

    Everything you have shown above is working exactly as it is supposed to work, assuming there is no process running on the machine called ‘vnc*‘.

    You should try with just ‘vnc‘, as your grep command is the thing wrong here, not the kill command…

  4. oke deh says:

    Hello tecmint,

    I try to kill this process but its not working…

    "[[email protected] ~]# ps -afe|grep vnc*
    root     19784 19688  0 00:02 pts/0    00:00:00 grep vnc*"

    I tried following command..

    # kill -9 19784

    return this output

    "-bash: kill: (19784) - No such process"

    what is the correct command?

Leave a Reply to raghu Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.