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.
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)- A4% (2)
- B2% (1)
- C92% (48)
- D2% (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.
/proc/ is a volatile, in-memory virtual filesystem; no changes are persisted anywhere on disk, and there is no /etc/proc.d/ mechanism.
Many files under /proc/sys/ are writable by root and are the standard interface for tuning live kernel parameters at runtime.
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.
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
Community Discussion
No community discussion yet for this question.