LFCS · Question #686
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. With udev, custom device rules are added to /etc/udev/rules.d/, and the /dev directory itself is a tmpfs mounted dynamically during system startup.
Question
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
(26 responses)- B96% (25)
- C4% (1)
Why each option
With udev, custom device rules are added to /etc/udev/rules.d/, and the /dev directory itself is a tmpfs mounted dynamically during system startup.
udev is an event-driven system; it only creates device nodes for devices that are physically connected or virtually present and detected by the kernel, not for all possible devices beforehand.
Additional udev rules can be created and stored in /etc/udev/rules.d/ as .rules files; these custom rules allow administrators to define how udev manages specific devices, such as assigning persistent names or permissions.
Although udev automates device node creation, it is still technically possible to manually create block or character device files in /dev/ using the mknod command, though this is rarely needed for dynamically managed devices.
When using udev, the /dev directory is typically mounted as a tmpfs (a RAM-based filesystem) early in the boot process, and udev dynamically populates it with device nodes as hardware is detected and configured.
The content of /dev/ is generated dynamically at boot by udev and is not stored persistently in /etc/udev/dev (which is not a standard location) or restored from there.
Concept tested: udev device management and /dev filesystem
Source: https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/best-practices-for-running-linux-on-hyper-v#configure-udev-rules
Topics
Community Discussion
No community discussion yet for this question.