Where is the typical location for source code on a Linux system?

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 is the typical location for source code on a Linux system?

Explanation:
Source code on Linux systems is typically kept in /usr/src. This follows the Filesystem Hierarchy Standard, which designates /usr/src as the place for source trees such as the kernel source. The kernel tree is usually found as /usr/src/linux-<version>, or similar naming, and you install a kernel-source package to obtain it. Other locations like /src, /var/src, or /opt/src aren’t standard repositories for development sources; /src isn’t part of the standard layout, /var is for variable data, and /opt is for optional applications rather than the primary place for source trees.

Source code on Linux systems is typically kept in /usr/src. This follows the Filesystem Hierarchy Standard, which designates /usr/src as the place for source trees such as the kernel source. The kernel tree is usually found as /usr/src/linux-, or similar naming, and you install a kernel-source package to obtain it. Other locations like /src, /var/src, or /opt/src aren’t standard repositories for development sources; /src isn’t part of the standard layout, /var is for variable data, and /opt is for optional applications rather than the primary place for source trees.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy