& Amp; 65279; & amp; 65279; displays process information. & Amp; 26684; type ps [options] process selection control for basic parameters-A,-e all processes-N, -- deselect all processes except those that meet specific conditions.-d all processes except the first process of the session. T the terminal is running successfully.
Function
Displays process information.
Format
Ps [options]
Main parameters
Basic process selection control
-A,-e
All processes
-N, -- deselect
Select all processes except for meeting specific conditions
-D
All except the first process of the session
T
All processes of the terminal
R
Only running processes are displayed.
List selection control
-C
Select by command name
-G
By realgroup ID
-U
Based on the user ID or user name
-P, -- pid
List by process ID
-- Ppid
Select a process based on the parent process id list
-S, -- sid
Select based on the session id list
Output Format
-F
Complete
-- Format,-o
Custom Format
-J
Job Format
-M
Add a column about security data
-H
Display process levels
-- Headers
Repeat the title line
-- No-headers
Do not show title line
Thread display
-L
Display threads in the LWP and NLWP columns
-M
Display thread after process
Others
-V, -- version
Show version information
-- Info
Display debugging information
-- Help
Show Help information
Example
Display All process information in standard format
Ps-ef
Output process tree
Ps-eH
Obtain thread information
Ps-eLf
Ps-emf
Obtain security information
Ps-eM
Display all processes running as root or admin
Ps-Uroot, admin-f
Display all processes in custom format
Ps-eopid, tt, user, fname
Display only the process ID of a command
Ps-Ccommandname-o pid =
Output Process name with PID 42
Ps-p 42-o comm =
Output all process information with PPID 42
Ps -- ppid42-f