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

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...

35 Responses

  1. Gordon says:

    Thanks. It was a helpful information.

  2. 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…

  3. 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?

Got something to say? Join the discussion.

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.