Managing processes can be useful for troubleshooting running programs on the operating system.
Commands
ps
ps - display current running processes
3 types of options (UNIX, BSD, GNU) - pick a format and stick with it.
psPIDTTYTIMECMD3131pts/100:00:00bash3157pts/100:00:00ps# Options:1UNIXoptions,whichmaybegroupedandmustbeprecededbyadash.2BSDoptions,whichmaybegroupedandmustnotbeusedwithadash.3GNUlongoptions,whichareprecededbytwodashes.# Display all the processes for users using BSD syntaxpsax|less-S# Display all the processes for users using UNIX syntaxps-e|less-SpsauxUSERPID%CPU%MEMVSZRSSTTYSTATSTARTTIMECOMMANDroot10.20.210099211880?Ss11:030:02/sbin/initsplashroot20.00.000?S11:030:00 [kthreadd]root30.00.000?I<11:030:00 [rcu_gp] [...]ps-efUIDPIDPPIDCSTIMETTYTIMECMDroot10011:03?00:00:02/sbin/initsplashroot20011:03?00:00:00 [kthreadd]root32011:03?00:00:00 [rcu_gp]user31312986011:10pts/100:00:00bashroot32382011:18?00:00:00 [kworker/1:0-events]root32392011:19?00:00:00 [kworker/u256:0-events_unbound]user32403131011:21pts/100:00:00ps-ef [...]# USER = user ID of the process (same premissions as the user)# PID = process ID (unique for every process)# PPID = parrent PID - PID of the parrent process that created this process# C = process utilization percentage# STIME = start time of the process# TTY = terminal use of the process (no associated terminal if ?)# TIME = amount of CPU time used by the process# CMD = command that started the process# Display every process running as rootps-Uroot-urootu# Check examples on the manual pagemanps# Show process hierarchyps-eH|less-S
pstree
pstree - display a tree of processes (hierarchy easier to read)