List recognized timers with their next and previous activation times and associated units.
Which command is appropriate?
systemctl list-timers displays NEXT, LAST, timer units, and the units they activate.
Detailed explanation
systemctl list-units --type=serviceIncorrect. It lists services rather than timer schedules.
Incorrect. It lists services rather than timer schedules.
systemctl list-timersCorrect. list-timers shows the timer schedule information.
Correct. list-timers shows the timer schedule information.
systemctl show-calendarIncorrect. systemctl has no general show-calendar subcommand for this.
Incorrect. systemctl has no general show-calendar subcommand for this.
crontab -lIncorrect. crontab -l does not show systemd timers.
Incorrect. crontab -l does not show systemd timers.
Try it yourself
An example you can run in a temporary verification environment.
systemctl list-timers --no-pager --no-legend 2>&1 | head -n 3Expected result
timerがある環境ではNEXT、LEFT、LAST、PASSED、UNIT、ACTIVATESに対応する行Key points
- list-timers
- Read-only
- NEXT and ACTIVATES
Notes
- Environment: systemd稼働環境 / 状態読取のみ
- 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.