kill command (Linux / bash / sh / zsh)
What it does
Send a signal to one or more processes. When people search for the kill command linux process, they usually want kill's everyday flags, safe examples, and how it differs from related tools. Below you'll find syntax, options, and copyable examples for Bash/sh/zsh.
Send a signal to one or more processes.
Syntax
kill [OPTION]... PID...
Common options
| Flag / option | Meaning |
|---|---|
| -TERM | Request graceful termination; the default signal. |
| -KILL | Force immediate termination. |
| -HUP | Request reload or terminal hangup handling. |
| -l | List signal names. |
Practical examples
Graceful stop
kill 4242
Sends SIGTERM to PID 4242.
Reload service process
kill -HUP 4242
Asks a supporting process to reload configuration.
Force as last resort
kill -KILL 4242
Immediately stops a process that cannot recover.
Linux ↔ Windows equivalent
Closest match: Stop-Process (Windows / PowerShell). Stop one or more local processes by name, ID, or pipeline input.
Common mistakes
- Using SIGKILL first, preventing cleanup and possible data flushing.
- Killing the wrong process because a stale PID was reused.
Related commands
- psDisplay a snapshot of running processes.
- topMonitor processes and system resource use in real time.
- Stop-ProcessStop one or more local processes by name, ID, or pipeline input.
- Get-ProcessRetrieve local or remote process objects and resource metrics.
- tasklistList local or remote running processes with selectable fields and filters.
- taskkillEnd processes by process ID or executable image name.
FAQ
What does kill do in Linux?
Send a signal to one or more processes.
How do I use kill from the terminal?
Start with `kill [OPTION]... PID...`, then choose only the options needed for the task.
What is a practical kill example?
Try `kill 4242` — Sends SIGTERM to PID 4242.
Can I use kill in a shell script?
Yes. kill works in Bash, sh, and Zsh, but scripts should handle quoting, errors, and command output explicitly.
Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.