System Administration Guide: Advanced Administration

How to Kill a Process

  1. (Optional) To kill a process that belongs to another user, become superuser.

  2. Obtain the of the process ID of the process you want to stop.


    $ pgrep process
    

    process is the name of the process you want to display more information about.

    The process identification number is displayed in the first column of the output.

  3. Stop the process.


    $ pkill [-9] pid 
    

    -9

    Ensures that the process terminates promptly. 

    pid

    Process ID to stop. 

  4. Verify that the process has been stopped.


    $ pgrep pid