nerdexam
CompTIA

LX0-103 · Question #85

Which of the following statements is correct when talking about /proc/?

The correct answer is C. All changes to files in /proc/ are immediately recognized by the kernel.. The /proc/ filesystem is a virtual interface to the running kernel, so writes to its files take effect immediately without any persistence or access restriction.

Devices, Linux Filesystems, Filesystem Hierarchy Standard

Question

Which of the following statements is correct when talking about /proc/?

Options

  • AAll changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot.
  • BAll files within /proc/ are read-only and their contents cannot be changed.
  • CAll changes to files in /proc/ are immediately recognized by the kernel.
  • DAll files within /proc/ are only readable by the root user.

How the community answered

(52 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    92% (48)
  • D
    2% (1)

Why each option

The /proc/ filesystem is a virtual interface to the running kernel, so writes to its files take effect immediately without any persistence or access restriction.

AAll changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot.

/proc/ is a volatile, in-memory virtual filesystem; no changes are persisted anywhere on disk, and there is no /etc/proc.d/ mechanism.

BAll files within /proc/ are read-only and their contents cannot be changed.

Many files under /proc/sys/ are writable by root and are the standard interface for tuning live kernel parameters at runtime.

CAll changes to files in /proc/ are immediately recognized by the kernel.Correct

The /proc/ filesystem (procfs) is a virtual filesystem that exposes kernel internals as files. Writing to writable files such as those under /proc/sys/ immediately changes live kernel parameters - for example, writing to /proc/sys/net/ipv4/ip_forward toggles IP forwarding in real time with no reboot required.

DAll files within /proc/ are only readable by the root user.

Most files in /proc/ are world-readable by design so that unprivileged users and tools can query system and process information.

Concept tested: Linux /proc virtual filesystem and kernel interface

Source: https://www.kernel.org/doc/html/latest/filesystems/proc.html

Topics

#/proc filesystem#kernel interface#virtual filesystem#runtime parameters

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice