0
0
Linux CLIscripting~10 mins

systemd timers in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start a systemd timer named backup.timer.

Linux CLI
sudo systemctl [1] backup.timer
Drag options to blanks, or click blank then click option'
Aenable
Bstart
Cstop
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'enable' only sets the timer to start on boot but does not start it immediately.
Using 'stop' or 'status' does not start the timer.
2fill in blank
medium

Complete the code to check the status of a systemd timer named cleanup.timer.

Linux CLI
systemctl [1] cleanup.timer
Drag options to blanks, or click blank then click option'
Arestart
Bdisable
Cstatus
Dreload
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'restart' will restart the timer but does not show status.
Using 'disable' stops the timer from starting on boot.
Using 'reload' reloads configuration but does not show status.
3fill in blank
hard

Fix the error in the command to enable a timer named sync.timer.

Linux CLI
sudo systemctl [1] sync.timer
Drag options to blanks, or click blank then click option'
Aenable
Bstop
Cdisable
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' only runs the timer now but does not enable it on boot.
Using 'disable' or 'stop' will prevent the timer from running.
4fill in blank
hard

Fill both blanks to create a systemd timer file snippet that runs a service every 10 minutes.

Linux CLI
[Timer]
OnUnitActiveSec=[1]
Unit=[2]
Drag options to blanks, or click blank then click option'
A10min
Bbackup.service
C10m
Dcleanup.service
Attempts:
3 left
💡 Hint
Common Mistakes
Using '10min' is not a valid time format for systemd timers.
Specifying the wrong service name will not trigger the intended service.
5fill in blank
hard

Fill all three blanks to create a systemd timer file snippet that runs a service daily at 2:30 AM.

Linux CLI
[Timer]
OnCalendar=[1]
Unit=[2]
Persistent=[3]
Drag options to blanks, or click blank then click option'
Adaily
Bbackup.service
Ctrue
D2:30
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'daily' schedules the timer at midnight instead of 2:30 AM.
Leaving Persistent off may cause missed runs if the system was off.