LPIC-1 Administrative Tasks Practice Question
A system administrator needs to ensure a custom script runs every time the system boots. Where should the script be placed for execution during the boot process on a standard Linux system?
⚠ Common exam trap
A common mix-up: candidates confuse cron directories (like /etc/cron.d/ or /etc/cron.hourly/) with boot-time execution, because both involve running scripts, but cron is strictly time-based and unrelated to the boot sequence.
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
✓
/etc/rc.local
/etc/rc.local is a legacy system initialization script that is executed at the end of the boot process on many Linux distributions using SysV init or systemd (with a compatibility unit). Placing a custom script inside /etc/rc.local ensures it runs once per boot, after all other init scripts have completed, making it a straightforward method for executing custom commands or scripts at system startup.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/etc/cron.d/
Why it's wrong here
Cron.d is for scheduled tasks, not boot-time execution.
- ✗
/etc/init.d/
Why it's wrong here
Init.d contains system service scripts, but a custom script would need to be properly configured as a service.
- ✗
/etc/cron.hourly/
Why it's wrong here
Cron.hourly runs hourly, not on boot.
- ✓
/etc/rc.local
Why this is correct
This file is executed at the end of the boot process and is suitable for custom startup scripts.
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 527-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.