CLH-014

PROCESS CONTROL

< Script House
operator@shadow:~
[SYSTEM] Process control module loaded
[MISSION] Manage and terminate processes like a system operator
> Mission: Master kill, jobs, bg, fg, and nohup
Type help for available commands.
operator@shadow:~$

CURRENT OBJECTIVE

1
2
3
4
5

SURVEY: List Running Processes

Use ps aux to see all running processes on the system.

$ ps aux

PROCESS TERMINATION

The Mission

Process management is critical for incident response. Learn to identify, control, and terminate processes - both friendly and hostile.

ps - Process Status

$ ps aux
All processes, all users
$ ps -ef
Full format listing

kill - Terminate Process

$ kill PID
Send SIGTERM (graceful)
$ kill -9 PID
Send SIGKILL (force)
$ killall processname
Kill by name

Job Control

$ jobs
List background jobs
$ bg %1
Resume job 1 in background
$ fg %1
Bring job 1 to foreground

nohup - Persistent Process

$ nohup ./script.sh &
Run immune to hangups
DANGER:

kill -9 cannot be caught or ignored. Use only when SIGTERM fails.

PRO TIP:

Use pgrep to find PIDs by name: pgrep -f "process"