Drives and devices

Under UNIX, the word "device" is used for all peripheral devices connected to your computer; this includes hard drives, floppy and CD-ROM drives, audio and video cards, serial and parallel ports, and much more. Each device has a name, such as /dev/hda. The most common device names are listed below (for Linux; other varieties of UNIX may use slightly different device names).

NoteNOTE
 

If the acronyms IDE and SCSI are new to you, here is a brief explanation: there are two types of interfaces for hard drives and other similar devices: IDE (and its cousins such as EIDE, ATAPI, etc.) and SCSI. SCSI provides better performance, but is more expensive, so it is only used on servers. If you are not sure what kind of drives you have, most probably it is IDE.

In addition, it is a common practice to have symlinks /dev/floppy, /dev/modem and /dev/cdrom pointing to the actual device name corresponding to your floppy drive, modem, and CD-ROM drive respectively.

You rarely need to use these device names. In particular, if you want to access a file on a drive, you do not use the device name (such as /dev/fd0); instead, you first mount the device so that its contents shows as a subdirectory (for example, /mnt/floppy) in the main directory tree, and then use this directory for accessing files; see the section called Mounting and unmounting drives for more information. About the only time when you actually need to use the device names is when you are configuring some newly installed program. For example, a fax program can ask you for the device name for your modem (in which case you can either give it the actual device name, such as /dev/ttyS1, or just use the symlink /dev/modem).

And just for fun: there is also a device /dev/null which acts as a "black hole": you can send to it any information, and it never returns. So if you do not want to be bothered by error messages, re-direct them to /dev/null -:).

Partitions

Note that it is possible to subdivide a hard drive (or a similar device) into parts which for all practical purposes behave as independent disks, even though physically they reside on the same disk. These parts are called "partitions" (under Windows, the name "logical disk" is used). For example, you can partition your hard drive into several partitions, and install different operating systems in different partitions; you can reformat each partition independently of the others. This partitioning of the hard drive is usually done during the installation of the operating system; refer to your installation guide for more information.

If your hard drive has been partitioned then each partition is considered as a separate device. For example, if your hard drive is /dev/hda, then the first partition on this drive would be referred to as /dev/hda1, the second as /dev/hda2, and so on.

WarningPartitioning of ZIP disks
 

For reasons unknown to us, the pre-formatted ZIP disks sold in stores or formatted using Iomega's ZIP tools under Windows are partitioned in a strange way: they have only one partition (of Windows type, of course), but this partition has number 4. Thus, if your ZIP drive is /dev/hdc, the correct device name you should use for such disks is /dev/hdc4.