You have loaded a custom kernel module that registers a character driver with major number 240 and minor number 0 on an embedded Linux system that does not run udev. Before user-space programs can open the device, you must create the associated node in /dev manually. Which command accomplishes this task?
The mknod utility is used to create device special files by specifying the device type followed by its major and minor numbers. The letter c designates a character device (byte-oriented stream I/O), while b is used for block devices that perform buffered, random access. The major number tells the kernel which driver to call; the minor number is passed to that driver to select a specific sub-device. Therefore mknod /dev/mydrv c 240 0 correctly creates a character device with major 240 and minor 0. The option that uses b creates the wrong device type; reversing the numbers assigns the driver incorrectly; and touch merely creates a regular file with no special device semantics.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the difference between a character device and a block device?
Open an interactive chat with Bash
What are major and minor numbers in a device node?
Open an interactive chat with Bash
Why is udev not used in this scenario, and what does it normally do?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access