Skip to main content

Command referencekill

kill command (Linux / bash / sh / zsh)

Linuxbashshzshprocessintermediate

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 / optionMeaning
-TERMRequest graceful termination; the default signal.
-KILLForce immediate termination.
-HUPRequest reload or terminal hangup handling.
-lList 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.

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.