010-160 · Question #70
Which of the following devices represents a hard disk partition?
The correct answer is D. /dev/sda2. In Linux, block devices such as hard disks and their partitions follow a specific naming convention under /dev/. The first SCSI/SATA disk is sda, and partitions are numbered starting at 1, making /dev/sda2 the second partition on the first disk.
Question
Options
- A/dev/hdyS0
- B/dev/sata0
- C/dev/part0
- D/dev/sda2
- E/dev/sda/p2
How the community answered
(33 responses)- A6% (2)
- B3% (1)
- D88% (29)
- E3% (1)
Why each option
In Linux, block devices such as hard disks and their partitions follow a specific naming convention under /dev/. The first SCSI/SATA disk is sda, and partitions are numbered starting at 1, making /dev/sda2 the second partition on the first disk.
/dev/hdyS0 mixes the legacy IDE naming prefix 'hd' with a serial port suffix 'S0', which does not represent a valid Linux device.
/dev/sata0 is not a valid Linux kernel device node name - Linux does not use interface type names like 'sata' directly in device paths.
/dev/part0 is not a recognized Linux device naming convention for disk partitions.
Linux names SCSI and SATA disks as /dev/sda, /dev/sdb, etc., where 'sd' stands for SCSI disk and the letter indicates the disk order. Partition numbers are appended directly as integers, so /dev/sda2 correctly represents the second partition on the first SCSI/SATA disk. This naming is defined by the kernel's block device subsystem.
/dev/sda/p2 incorrectly uses a directory separator within a device name - Linux device nodes for partitions append the number directly without a subdirectory path.
Concept tested: Linux block device and partition naming conventions
Source: https://www.kernel.org/doc/html/latest/admin-guide/devices.html
Topics
Community Discussion
No community discussion yet for this question.