Courseiva

LPIC-1 Devices, Filesystems and FHS Practice Question

A system administrator wants to install custom scripts that should be available to all users. The scripts are not part of any package and should be placed under the Filesystem Hierarchy Standard (FHS). Which directory is most appropriate?

⚠ Common exam trap

Many candidates confuse /opt with /usr/local, but /opt is designed for self-contained third-party application packages (each in its own subdirectory), not for individual scripts that need to be directly in the PATH.

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

✓

/usr/local/bin

/usr/local/bin because the Filesystem Hierarchy Standard (FHS) designates /usr/local as the location for locally installed software not managed by the system's package manager. Placing custom scripts in /usr/local/bin ensures they are in the default PATH for all users, while keeping them separate from system binaries in /usr/bin and /bin.

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

    Why it's wrong here

    /var holds variable data such as logs, spools and caches that change during normal operation, so placing static custom scripts there misuses the hierarchy and risks deletion by cleanup routines. It is tempting because administrators routinely write to /var, but that is for runtime state, not shared executables; /usr/local/bin is the FHS location for locally installed, unpackaged scripts.

  • ✗

    /opt

    Why it's wrong here

    /opt holds add-on application software packages, each in its own subdirectory, so loose scripts shared by all users do not belong there. It is tempting because /opt is for non-distribution software, but locally authored commands belong in /usr/local/bin under the FHS.

  • ✓

    /usr/local/bin

    Why this is correct

    /usr/local/bin is reserved by the FHS for locally compiled or custom executables outside the package manager, exactly matching scripts that belong to no package. Placing them here keeps them on the default PATH for all users, satisfying the requirement that the scripts be globally available without distribution interference.

  • ✗

    /home

    Why it's wrong here

    /home contains per-user directories, so scripts placed there are not reliably on every user's PATH and depend on individual home directory permissions. It is tempting because users store personal scripts in their own home, which is correct for private tooling; shared, unpackaged executables belong in /usr/local/bin under the FHS.

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.