nerdexam
CompTIA

XK0-004 · Question #66

What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)

The correct answer is B. Additional rules for udev can be created by adding them to /etc/udev/rules.d/. D. The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup. udev manages /dev/ dynamically at runtime, creating only entries for connected devices, with custom rules stored in /etc/udev/rules.d/ and the /dev/ directory mounted as a tmpfs-type filesystem.

System Management

Question

What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)

Options

  • AEntries for all possible devices get created on boot even if those devices are not connected.
  • BAdditional rules for udev can be created by adding them to /etc/udev/rules.d/.
  • CWhen using udev, it is not possible to create block or character devices in /dev/ using mknod.
  • DThe /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.
  • EThe content of /dev/ is stored in /etc/udev/dev and is restored during system startup.

How the community answered

(31 responses)
  • A
    6% (2)
  • B
    74% (23)
  • C
    3% (1)
  • E
    16% (5)

Why each option

udev manages /dev/ dynamically at runtime, creating only entries for connected devices, with custom rules stored in /etc/udev/rules.d/ and the /dev/ directory mounted as a tmpfs-type filesystem.

AEntries for all possible devices get created on boot even if those devices are not connected.

udev creates device nodes only for hardware that is actually detected or connected, not for all possible devices; this dynamic, on-demand creation is a core design feature of udev over the older static /dev/ approach.

BAdditional rules for udev can be created by adding them to /etc/udev/rules.d/.Correct

udev processes rule files from /lib/udev/rules.d/ and /etc/udev/rules.d/ in lexicographic order; adding files to /etc/udev/rules.d/ is the standard, supported mechanism for administrators to define custom device naming, permissions, and event handling rules.

CWhen using udev, it is not possible to create block or character devices in /dev/ using mknod.

mknod can still be used to manually create block or character device files in /dev/ even when udev is managing the directory; udev does not prevent or restrict mknod usage.

DThe /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.Correct

udev mounts /dev/ as a tmpfs (specifically devtmpfs) during early system startup, meaning its contents exist only in RAM and are populated dynamically based on detected hardware rather than being persisted to disk.

EThe content of /dev/ is stored in /etc/udev/dev and is restored during system startup.

/dev/ is a volatile in-memory filesystem rebuilt at each boot from udev rules and kernel events; there is no persistent store at /etc/udev/dev that preserves its contents across reboots.

Concept tested: udev dynamic device management and rule configuration

Source: https://www.freedesktop.org/software/systemd/man/udev.html

Topics

#udev#/dev directory#device management#tmpfs

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice