Show All Running Processes in Linux: Ps Command
Show All Running Processes in Linux: Ps Command
How do I see all running process 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
Type the following ps command to display all running process:
# ps aux | less
Where,
-A: select all processes a: select all processes on a terminal, including those of other users x: select processes without controlling ttys
The top program provides a dynamic real-time view of a running system. Type the top at command prompt:
# top
Output:
Fig.01: top command: Display Linux Tasks To quit press q, for help press h.
Sample outputs:
Following command will list the process called sshd which is owned by root user.
$ pgrep -u root sshd
or
# yum install htop
Sample outputs:
atop program
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:
# atop
Sample outputs: