Courseiva
Administrative TaskseasyMultiple ChoiceObjective-mapped

LPIC-1 Administrative Tasks Practice Question

An administrator wants to run a shell script every day at 2:00 AM. Which command should be used to edit the user's personal crontab?

⚠ Common exam trap

Many candidates think they can directly edit the crontab file in `/var/spool/cron/` with `vi`, but the LPIC-1 exam expects you to know that only the `crontab` command should be used to safely modify user crontabs to avoid syntax errors and file corruption.

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 correct command to edit a user's personal crontab is `crontab -e`. This invokes the default text editor (as defined by the EDITOR or VISUAL environment variable) on the user's crontab file, ensuring proper syntax validation and locking to prevent concurrent edits. It is the standard and recommended way to modify cron jobs for the current user.

Answer analysis

Option-by-option breakdown

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

  • crontab -l

    Why it's wrong here

    Only lists the current crontab, does not allow editing.

  • crontab -e

    Why this is correct

    Opens the personal crontab in the default editor for modifications.

  • at 2:00 AM

    Why it's wrong here

    Schedules a one-time job, not recurring.

  • vi /var/spool/cron/crontabs/username

    Why it's wrong here

    Direct editing of the spool file is not recommended; use 'crontab -e' instead.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 527 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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.