ps Linux Commands
What is Linux ps Command?
Explanation
ps COMMAND:ps command is used to report the process status. ps is the short name for Process Status.
SYNTAX :
ps [options]
OPTIONS:
-a |
List information about all processes most frequently requested: all those except process group leaders and processes not associated with a terminal.. |
-A or e |
List information for all processes. |
-d |
List information about all processes except session leaders. |
-e |
List information about every process now running. |
-f |
Generates a full listing. |
-j |
Print session ID and process group ID. |
-l |
Generate a long listing. |
EXAMPLE:
-
ps
Output:
PID TTY
TIME CMD
2540 pts/1
00:00:00 bash
2621 pts/1
00:00:00 ps
In the above example, typing ps alone would list the current running processes.
-
ps -f
Output:
UID
PID PPID C STIME TTY
TIME CMD
nirmala
2540 2536 0 15:31 pts/1
00:00:00 bash
nirmala
2639 2540 0 15:51 pts/1
00:00:00 ps -f
Displays full information about currently running processes.