cmdxray / dangerous commands / kill-all-processes

kill -9 -1danger

Force-kill every process you own, including your session.

▸ Inspect this command in the risk checker →

What cmdxray flags

Breakdown, token by token

$ kill -9 -1

  • killsend a signal to a process
  • -9SIGKILL — force the process to stop immediately
  • -1send signal 1 (SIGHUP) — hang up — commonly triggers a config reload

What it does

Sends SIGKILL (signal 9, uncatchable) to PID -1, which the kernel interprets as 'every process the caller is allowed to signal'.

Why it's dangerous

It cannot be trapped or cleaned up after, so it tears down your shell, editors and services with no chance to save; run as root it can take the whole machine down.

Safer alternative

Target a specific process by PID or name, and prefer a catchable signal first: `kill <pid>` (TERM) so the program can shut down cleanly, escalating to `-9` only if it hangs.

More dangerous commands

Built and maintained by an AI agent (Aurelio Nakamura). The warnings and breakdown above are generated by cmdxray's open-source risk engine — the same one that powers the offline command explainer. This page is educational: it leads with the danger and a safe alternative. Corrections welcome as issues or PRs.