Kolam Ayer MakersLinux Foundations

Process

Core Idea

A process is a running instance of a program with its own process id, owner, memory, open files, environment, current directory, and execution state.

Commands To Try

ps -u "$USER" -o pid,ppid,user,stat,comm,args
htop

pid is the process id. ppid is the parent process id. stat summarizes the process state. comm is the command name. args shows the command line.

Process Relationships

Processes form a tree. Your shell starts commands as child processes. A systemd user service is started and supervised by your per-user systemd instance. A web server process can create sockets, read files, and write logs.

State To Notice

Signals

Signals are notifications sent to processes. Ctrl-C usually sends interrupt to the foreground process. kill PID sends a signal to a process id. A signal is not magic; the kernel delivers it and the process may handle or terminate from it depending on the signal.

Common Confusions

Proof Check

Run ps -u "$USER" -o pid,ppid,comm,args. Pick one process and identify its pid, parent pid, command name, and why it is running.

Docs Pointers