↑↓ move Enter open Esc close

How to Kill a Process in Linux

Find a process, send it SIGTERM first, and use SIGKILL only when necessary.

The safest process termination workflow is identify, inspect, then signal. SIGTERM is the normal first choice because it allows an application to clean up.

Step by step

1 Find the process

$ ps aux | grep node

Use a distinctive process name and verify the PID before acting.

2 Inspect the PID

$ ps -fp 12345

Confirm the PID and full command line.

3 Ask it to exit cleanly

$ kill 12345

SIGTERM asks the process to shut down gracefully.

4 Force termination as a last resort

$ kill -9 12345

SIGKILL cannot be caught or handled by the process, so normal cleanup is skipped.

Tips worth knowing

Frequently asked questions

What does kill do in Linux?

It sends a signal to a process identified by PID; the default is SIGTERM.

What does kill -9 do?

It sends SIGKILL, which the target cannot catch or ignore.

The commands behind it

Concepts involved: Process · PID (Process ID)

More how-to guides