Understanding /dev
The /dev
directory is a special directory where the contents are created by the kernel at installation time. This directory contains special files that allow users or applications to interact with physical and sometimes logical devices.
If we look at the previous ls
command's results, we can see that within the /dev
directory there are several files that begin with sd
.
In the previous chapter, we learned that files that start with sd
are actually seen as SCSI or SATA drives. In our case, we have both /dev/sda
and /dev/sdb
; this means, on this system, there are two physical SCSI or SATA drives.
The additional devices /dev/sda1
, /dev/sda2
, /dev/sdb1
, and /dev/sdb2
are simply partitions of those disks. In fact, with disk drives, a device name that ends with a numeric value is often a partition of another device, just as /dev/sdb1
is a partition of /dev/sdb
. While there are of course some exceptions to this rule, it is often safe to make this assumption when troubleshooting disk...