Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To stop a Linux process, identify it first, verify its PID and command, then send a normal termination signal with kill PID. If you do not know the PID, use pgrep -a pattern or inspect the process list with ps -ef. In GNOME, select the app in System Monitor and choose End Process before considering Force Stop.

Find a process ID from the terminal

A process ID (PID) is the number assigned to a running process. Before signaling one, check that its command and, when useful, its owner identify the process you intend to stop.

List processes with ps

Run ps -ef to display a full-format process list, including a PID column and command arguments. Find the relevant row and verify the command and user rather than choosing a process by name alone. To inspect one known PID, run ps -p 1234 -f, replacing 1234 with the PID. To select by executable command name, use ps -C name -f; this matches the command name, not necessarily the full command line. See the ps manual.

Search by name with pgrep

Run pgrep -a firefox to show matching PIDs alongside their full command lines. Replace firefox with the process name or pattern you want to find. If several results appear, compare their command lines and ownership; do not assume the first result is the right instance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

By default, pgrep matches a process name. Add -f to match against the full command line, for example pgrep -af pattern. This can find a script or command even when its process name differs, but it may also return more candidates. The procps-ng manual notes that process-name matching can be limited to 15 characters in the documented implementation, so full-command-line matching may be useful for longer names. To narrow results to a user, use pgrep -u USER pattern, substituting the account name; selection criteria must all match. Review the results before acting. See the pgrep manual.

Stop a process safely with kill

Once you have verified the PID, start with a normal termination request: kill -TERM 1234. Substitute the actual PID for 1234. The shorter kill 1234 also sends SIGTERM by default in the documented procps-ng interface. SIGTERM asks the process to exit and gives it an opportunity to close cleanly. A signal being sent does not guarantee that the application completed cleanup or saved its data.

If the process remains stuck, check again that the PID still identifies the intended target, then use kill -KILL 1234 only as a last resort. SIGKILL forces termination and does not give the application an opportunity to save unsaved work. The GNOME System Monitor guidance likewise recommends trying a clean end first. Consult the installed kill manual for options supported by your version.

A PID can be reused after a process exits, so avoid a long delay between checking a PID and signaling it. The util-linux kill manual documents a --timeout option that can send a follow-up signal only to the same process identity, avoiding the PID-reuse race possible with a shell sequence that runs kill and then sleep. This option’s availability depends on the installed util-linux version; check your local manual before relying on it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When to use pkill instead

pkill pattern sends a signal to every process that matches the pattern, not just one instance. Its default signal is SIGTERM. That makes it convenient when you intentionally want to stop all matching processes, but risky when a name matches several unrelated instances.

Before using it, run pgrep -a pattern and review every result. Narrow the selection with criteria such as pgrep -u USER pattern, or use exact-name matching where appropriate. Only send a signal once the match set is the one you intend. See the pgrep and pkill manual.

End a process in GNOME System Monitor

These controls describe GNOME System Monitor; other Linux desktops may use different applications, labels, or behavior.

  1. Open System Monitor and select the target process in the Processes tab.
  2. Choose End Process first. GNOME Help says, “You should always try End Process first.” It tries to close the process properly and gives it time to save files.
  3. If the process has not closed after a few seconds, right-click it and choose Force Stop. GNOME says this forces it to close straight away; unsaved files may be lost.

Read GNOME Help’s System Monitor documentation for the documented workflow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the method that fits the situation

Situation Useful approach What to check
You know the PID ps -p PID -f, then kill -TERM PID Verify the command and owner before signaling.
You know the process name pgrep -a pattern Review all returned command lines; a name may match multiple instances.
The process name differs from the command or script text pgrep -af pattern Full-command-line matching can return extra candidates.
You want to stop every matching process pkill pattern It signals every match; inspect the set with pgrep -a pattern first.
You prefer visual selection GNOME System Monitor: End Process, then, if needed, Force Stop The named controls are specific to the documented GNOME workflow.

Check your installed command options

Process utilities and their options can differ with the installed procps-ng or util-linux version. For the commands on your system, consult man ps, man pgrep, and man kill. Use a graceful termination request first when practical, and verify the target before escalating.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.