List all current processes once with UID, PID, parent PID, start time, and command.
Which command is appropriate?
ps -ef prints all processes once in a System V full listing, including the parent process ID. It does not continuously refresh.
Detailed explanation
top -fIncorrect. top is an interactive continuously updating monitor.
Incorrect. top is an interactive continuously updating monitor.
jobs -efIncorrect. jobs is a shell job command and does not use -ef for all processes.
Incorrect. jobs is a shell job command and does not use -ef for all processes.
pgrep -efIncorrect. pgrep searches matching process IDs rather than displaying a full listing.
Incorrect. pgrep searches matching process IDs rather than displaying a full listing.
ps -efCorrect. ps -ef produces the requested one-time full process snapshot.
Correct. ps -ef produces the requested one-time full process snapshot.
Try it yourself
An example you can run in a temporary verification environment.
ps -ef | headExpected result
process一覧の先頭部分Key points
- ps -ef
- Snapshot
- PPID
Notes
- Environment: procps-ng系ps
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.