How do I see all running process in Linux? Type the following ps command to display all running process: Where, The top program provides a dynamic real-time view of a running system. Type the top at command prompt: To quit press q, for help press h. pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees rooted at processes owned by that user are shown. Type the following command: Type the following command: Type the following command: Use pgrep command. pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to screen. For example display firefox process id: Following command will list the process called sshd which is owned by root user. htop is interactive process viewer just like top, but allows to scroll the list vertically and horizontally to see all processes and their full command lines. Tasks related to processes (killing, renicing) can be done without entering their PIDs. To install htop type command: The program atop is an interactive monitor to view the load on a Linux system. It shows the occupation of the most critical hardware resources (from a performance point of view) on system level, i.e. cpu, memory, disk and network. It also shows which processes are responsible for the indicated load with respect to cpu- and memory load on process level; disk- and network load is only shown per process if a kernel patch has been installed. Type the following command to start atop:Show All Running Processes in Linux
You need to use the ps command. It provide information about the currently running processes, including their process identification numbers (PIDs). Both Linux and UNIX support ps command to display information about all running process. ps command gives a snapshot of the current processes. If you want a repetitive update of this status, use top command.ps command
# ps aux | less
Task: see every process on the system
# ps -A
# ps -eTask: See every process except those running as root
# ps -U root -u root -N
Task: See process run by user vivek
# ps -u vivek
Task: top command
# top
Output:Task: display a tree of processes
$ pstree
Sample outputs:Task: Print a process tree using ps
# ps -ejH
# ps axjfTask: Get info about threads
# ps -eLf
# ps axmsTask: Get security info
# ps -eo euser,ruser,suser,fuser,f,comm,label
# ps axZ
# ps -eMTask: Save Process Snapshot to a file
# top -b -n1 > /tmp/process.log
Or you can email result to yourself:# top -b -n1 | mail -s 'Process snapshot'
Task: Lookup process
$ pgrep firefox
$ pgrep -u root sshd
Say hello to htop and atop
# apt-get install htop
or# yum install htop
Now type the htop command at the shell prompt:# htop
Sample outputs:atop program
# atop
Sample outputs: