Display system uptime, logged-in user count, and one-, five-, and fifteen-minute load averages.
Which command is appropriate?
uptime prints continuous uptime, logged-in users, and the 1/5/15-minute load averages.
Detailed explanation
jobsIncorrect. jobs lists current-shell jobs.
Incorrect. jobs lists current-shell jobs.
kill -lIncorrect. kill -l lists signal names.
Incorrect. kill -l lists signal names.
uptimeCorrect. uptime reports all requested system summary values.
Correct. uptime reports all requested system summary values.
fgIncorrect. fg changes a shell job's foreground state.
Incorrect. fg changes a shell job's foreground state.
Try it yourself
An example you can run in a temporary verification environment.
uptimeExpected result
up期間、users、load average 3値Key points
- uptime
- Load average
- 1/5/15 minutes
Notes
- Environment: procps-ng系uptime
- 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.