Processes
Every time a user issues a command, a program is run and one or more processes are generated.
Processes exist in a hierarchy. After the kernel is loaded in memory on boot, the first process is initiated which - in turn - starts other processes, which, again, can start other processes.
Each process has a unique identifier PID
and a parent process identifier PPID
.
Here are some commands to analyze processes.
-
ps: Shows information about the executing processes as a snapshot.
-
pstree: Shows the processes in a hierarchy.
-
top: Shows information about the processes in real time.
-
htop: Similar to top but it is a lot more modern.
-
free: How much memory is being used and how much is available.
-
uptime: How much time the system has been up and the load average of the last 1, 5 and 15min.
-
pgrep: Process with the grep functionality.