Courseiva

LFCS Operation of Running Systems Practice Question

A Linux administrator needs to schedule a backup script to run every day at 2:30 AM. The script is located at /usr/local/bin/backup.sh. Which command should the administrator use to edit the crontab for the root user?

⚠ Common exam trap

The trap here is thinking that editing /etc/crontab directly is equivalent to using crontab -e, but the system-wide file requires a username field and is not the recommended method for user-specific jobs.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

crontab -e

The command 'crontab -e' opens the crontab file for the current user (root in this case) in an editor, allowing the administrator to add the line '30 2 * * * /usr/local/bin/backup.sh'. This is the standard and safest way to schedule a recurring job. Other options either list jobs, edit a system file inappropriately, or modify the service unit, none of which achieve the goal.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    systemctl edit cron.service

    Why it's wrong here

    This command opens a systemd override for the cron service, which is used to modify how the service starts, not to schedule user jobs. It does not provide a way to add a cron job. Scheduling a recurring task is done via crontab, not by editing the service unit. Therefore, this option is incorrect for the task.

  • ✗

    vi /etc/crontab

    Why it's wrong here

    Editing /etc/crontab directly is possible but not recommended because it is a system-wide file with a different format that requires a username field. Using 'crontab -e' is safer and less error-prone. Directly editing /etc/crontab can lead to syntax errors and does not automatically apply the change without reloading the cron service. Thus, it is not the best practice.

  • ✗

    crontab -l

    Why it's wrong here

    The '-l' option lists the current user's crontab entries but does not allow editing. It would only display existing jobs, not enable adding a new one. Since the administrator needs to schedule a new job, this command is insufficient. It is useful for verification but not for making changes.

  • ✓

    crontab -e

    Why this is correct

    Running 'crontab -e' as root opens the root user's crontab in the default editor, allowing the administrator to add the schedule for the backup script. This is the standard method to create or modify a user's cron jobs. It ensures the job runs with root privileges and is the correct command for this scenario.

About these practice questions

Courseiva writes every LFCS question from scratch — 406 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.