Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cyber Security Cards › Revision Cards

Processes

Processes A process is a running program. Each has a PID (process ID number). ps -ef : list processes. top : live view. kill PID : stop one. Crypto-miners and reverse shells show up as strange processes: high CPU, odd names, running from /tmp . ps -ef --forest and lsof -i help find them. Using kill

Processes A process is a running program. Each has a PID (process ID number). ps -ef : list processes. top : live view. kill PID : stop one. Crypto-miners and reverse shells show up as strange processes: high CPU, odd names, running from /tmp . ps -ef --forest and lsof -i help find them. Using kill
Processes · Download PNG
Read card text

What this card says

What it is

A process is a running program. Each has a PID (process ID number).

Key commands

ps -ef: list processes. top: live view. kill PID: stop one.

Why it matters for security

Crypto-miners and reverse shells show up as strange processes: high CPU, odd names, running from /tmp.

ps -ef --forest and lsof -i help find them.

Common mistake

Using kill -9 first. Send a normal kill first so the program can clean up. -9 on a database can corrupt data.

CommandPurpose
ps auxAll processes with user, CPU, memory
ps aux | grep nginxFind a specific process
pgrep -a nodePIDs and command lines matching a name
topLive view (press q to quit, M sort by memory, P by CPU)
kill PIDPolitely ask process to stop (SIGTERM, 15)

Learn more in the lesson: 5.8 Processes

See all Ravi Sir's Cyber Security Cards