pkill Linux Commands

What is Linux pkill Command?

Explanation

pkill COMMAND:

pkill command is used to terminate or stop a running process immediately.

SYNTAX :


pkill [options]

OPTIONS:


-d Set the string used to delimit each process ID in the output.
-g pgrp Only match processes in the process group IDs listed.
-f The pattern is normally only matched against the process name.
-l List the process name as well as the process ID. (pgrep only.)
-n Select only the newest (most recently started) of the matching processes.
-o Select only the oldest (least recently started) of the matching processes.
-v Negates the matching.
-x Only match processes whose name exactly match the pattern.
-signal Defines the signal to send to each matched process.

EXAMPLE:


  1. pkill chrome
    Output:
  2. In the above example, the command stops the web browser chrome, which is currently running in the background.

Ask Questions

Ask Question