pkill Command Generator
Generate pkill commands to signal processes by name or pattern
Getting Started with pkill
## What is pkill?
The `pkill` command signals processes by matching their name (or other attributes) against a pattern — no need to look up PIDs first. It's a convenient shortcut that pairs with `pgrep` and is great for stopping many same-name processes at once.
## How to Use
1. **Enter Pattern**: Type the process name (or part of it) to match. 2. **Choose a Signal**: Default is `TERM`. Use `--signal KILL` or `-9` to force. 3. **Filter (optional)**: Narrow by user (`-u`) or terminal (`-t`). 4. **Copy & Run**: Copy the generated command into your terminal. Run `pkill -e <pattern>` first to preview what would be killed.
Common Options
### `--signal` Signal name Specify the signal by name. Defaults to `TERM`. Use `KILL` (or the `-9` shortcut) to force, `HUP` to reload, `STOP`/`CONT` to pause/resume.
### `-9` Force kill shortcut Equivalent to `--signal KILL` — kills matched processes immediately. Reserved for processes that ignore a graceful TERM.
### `-u` By user Only match processes owned by the given user. E.g. `pkill -u www-data php` stops PHP processes owned by www-data only.
### `-t` By terminal Match processes attached to a specific TTY, e.g. `pkill -t pts/0`. Useful for clearing stuck sessions.
### `-e` Echo only Print what would be signaled but don't actually send a signal — a dry run. Always preview with `-e` before a forceful `-9`.
### `-v` Inverse Match processes that do NOT match the pattern (negate the selection). Useful for "kill everything except X".
▶What's the difference between pkill and killall?
▶How do I safely preview what pkill will affect?
▶How do I kill every process owned by a specific user?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee