pkill -x nginx

Category: Administration

pkill -x nginx

Kill processes by exact name match

The -x flag makes pkill match the process name exactly instead of as a substring, so nginx matches only nginx. Plain pkill nginx would also hit processes like nginx-cache. Use pgrep first to preview what will be killed.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.