Courseiva
Administrative Tasks →mediumMultiple Choice

LPIC-1 Administrative Tasks Practice Question

Which configuration file is the primary configuration file for logrotate?

⚠ Common exam trap

A common mix-up: candidates confuse the directory /etc/logrotate.d/ (which holds supplementary configs) with the primary configuration file /etc/logrotate.conf, or mistake /etc/rsyslog.conf (a logging daemon config) for logrotate's config.

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/logrotate.conf

The primary configuration file for logrotate is /etc/logrotate.conf. This file sets global options such as rotation frequency, compression, and the number of rotated logs to keep. It also includes configuration snippets from /etc/logrotate.d/ via an include directive, but the main control file is /etc/logrotate.conf.

Answer analysis

Option-by-option breakdown

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

  • ✗

    /var/log/messages

    Why it's wrong here

    /var/log/messages is a log file that logrotate rotates; it holds no rotation directives. It appears plausible because rotation targets live under /var/log, so the path looks configuration-adjacent. The primary configuration file is /etc/logrotate.conf, with per-service snippets in /etc/logrotate.d/.

  • ✗

    /etc/logrotate.d/

    Why it's wrong here

    /etc/logrotate.d/ is a directory of per-package drop-in snippets included by the main file, not the primary configuration file itself. It is tempting because most service-specific rotation rules live there. The primary file is /etc/logrotate.conf, which defines global defaults and pulls in that directory.

  • ✓

    /etc/logrotate.conf

    Why this is correct

    /etc/logrotate.conf holds the global directives that logrotate reads first, including rotation frequency, retention count and compression defaults, before it processes any per-service drop-in files in /etc/logrotate.d/. This satisfies the stem's requirement for the primary configuration file, since the drop-ins are merely included from it rather than being primary themselves.

  • ✗

    /etc/rsyslog.conf

    Why it's wrong here

    /etc/rsyslog.conf configures the rsyslog daemon's rules and destinations, not log rotation. It is tempting because both govern log handling, and rsyslog can trigger rotation indirectly. The primary logrotate configuration file is /etc/logrotate.conf, which sets global defaults and includes /etc/logrotate.d/.

About these practice questions

One of 402 original LPIC-1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.