Every program, whether it’s a command, application, or script, that runs on your system is a process. Your shell is a process, and every command you execute from the shell starts one or more processes of its own (referred to as child processes). Attributes and concepts associated with these processes include:
A process lifetime is defined by the length of time it takes to execute (while it “lives”). Commands with a short lifetime such as ls will execute for a very short time, generate results, and terminate when complete. User programs such as web browsers have a longer lifetime, running for unlimited periods of time until terminated manually. Long-lifetime processes include server daemons that run continuously from system boot to shutdown. When a process terminates, it is said to die (which is why the program used to manually signal a process to stop execution is called kill; succinct, though admittedly morbid).
- Process ID (PID)
Every process has a number assigned to it when it starts. PIDs are integer numbers unique among all running processes.
- User ID (UID) and Group ID (GID)
Processes must have associated privileges, and a process’s UID and GID are associated with the user who started the process. This limits the process’s access to objects in the filesystem.
- Parent process
The first process started by the kernel at system start time is a program called init. This process has PID 1 and is the ultimate parent of all other processes on the system. Your shell is a descendant ...