Where do you store source code that is intended to be used by multiple users?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Where do you store source code that is intended to be used by multiple users?

Explanation:
The main idea is to place locally created or installed software in a location intended for locally managed content that should be accessible to all users. The conventional spot for source code that multiple users may need to use is /usr/local/src. This directory is part of the Filesystem Hierarchy Standard and is specifically meant for source code and other locally built materials that aren’t managed by the distribution’s package manager. It keeps locally sourced code separate from the package-managed files in /usr and ensures a central, predictable place for maintenance. Why the other paths aren’t as suitable: /usr/local/bin is for executable programs, not source code, so putting code there would be confusing and harder to manage; /usr/share/doc is for documentation, not code; and /opt/src isn’t a standard location and may not be present on all systems, making it less portable or predictable.

The main idea is to place locally created or installed software in a location intended for locally managed content that should be accessible to all users. The conventional spot for source code that multiple users may need to use is /usr/local/src. This directory is part of the Filesystem Hierarchy Standard and is specifically meant for source code and other locally built materials that aren’t managed by the distribution’s package manager. It keeps locally sourced code separate from the package-managed files in /usr and ensures a central, predictable place for maintenance.

Why the other paths aren’t as suitable: /usr/local/bin is for executable programs, not source code, so putting code there would be confusing and harder to manage; /usr/share/doc is for documentation, not code; and /opt/src isn’t a standard location and may not be present on all systems, making it less portable or predictable.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy