Home >Operation and Maintenance >Linux Operation and Maintenance >How to view processes in linux
How to view processes in Linux: 1. ps command to view static process statistical information; 2. top command to view process dynamic information; 3. pgrep command to query process PID information based on specific conditions; 4. pstree command to view the process tree and list process information in a tree structure.
The operating environment of this tutorial: linux7.3 system, DELL G3 computer.
How to view processes in Linux:
1. ps command——View static process statistics (Processes Statistic)
Common options:
#a: Display all process information under the current terminal, including processes of other users.
u: Output process information in user-oriented format.
x: Display the processes of the current user in all terminals.
-e: Displays all process information in the system.
-l: Use long (long) format to display process information.
-f: Use full format to display process information.
2. top command——View process dynamic information
Display process rankings in a full-screen interactive interface, and track CPU and memory in real time System resource usage, etc., are refreshed every three seconds by default, and its function is basically similar to the task manager in Windows systems.
3. pgrep command——Query process PID information based on specific conditions
Example:
4. pstree command——View the process tree and list the process information in a tree structure
Example:
Related learning recommendations: linux video tutorial
The above is the detailed content of How to view processes in linux. For more information, please follow other related articles on the PHP Chinese website!