psDisplay all currently active processes.
ps -uxps -auxps -C process-nametopDisplay Linux processes.
Syntax: top
Example:
$ top
top - 07:37:31 up 52 min, 0 users, load average: 0.52, 0.58, 0.59
Tasks: 4 total, 1 running, 3 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.4 us, 13.3 sy, 0.0 ni, 83.1 id, 0.0 wa, 1.2 hi, 0.0 si, 0.0 st
KiB Mem : 8276908 total, 3993960 free, 4053596 used, 229352 buff/cache
KiB Swap: 25165824 total, 24881392 free, 284432 used. 4089580 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
221 shathin 20 0 17624 2076 1504 R 100.0 0.0 0:00.03 top
1 root 20 0 8936 304 260 S 0.0 0.0 0:00.11 init
7 root 20 0 8936 212 168 S 0.0 0.0 0:00.01 init
8 shathin 20 0 16784 3428 3316 S 0.0 0.0 0:00.58 bash
PID is the process ID. This is unique to every process in the system.USER specifies which the user the process belongs to.COMMAND specifies the command / process name.Keys that provide functionality within the top window:
s key when to change the delay (in seconds) of refreshing the information.i key filter out idle processes.k to kill a process. When the key is pressed a prompt appears asking for the PID of the process to be killed.htopInteractive process viewer.
Syntax: htop