nerdexam
CompTIA

XK0-004 · Question #65

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, in-memory interface to the running kernel, and writing to writable files within it (such as those under /proc/sys/) takes effect immediately without requiring a reboot.

System Management

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

(36 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    86% (31)
  • D
    8% (3)

Why each option

The /proc filesystem is a virtual, in-memory interface to the running kernel, and writing to writable files within it (such as those under /proc/sys/) takes effect immediately without requiring a reboot.

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

/proc is an in-memory virtual filesystem with no persistence mechanism; no directory like /etc/proc.d/ exists to store changes, and nothing is restored on reboot.

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

Many files in /proc/ are writable - for example, /proc/sys/ entries are designed to be written to in order to tune kernel parameters at runtime.

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

Because /proc is a virtual filesystem backed directly by the kernel, writes to writable entries like /proc/sys/net/ipv4/ip_forward are processed in real time by the kernel. There is no disk write or cache layer - the change is applied the moment the write system call completes.

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

Many /proc/ entries are world-readable by design so that regular users and tools can query system state (e.g., /proc/cpuinfo, /proc/meminfo).

Concept tested: Linux /proc virtual filesystem and kernel interaction

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

Topics

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

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice