In Linux various special files can be found under the directory /dev
. These files are called device files and behave unlike ordinary files. The most common types of device files are for block devices and character devices. These files are an interface to the actual driver (part of the Linux kernel) which in turn accesses the hardware. Another, less common, type of device file is the named pipe. The most important device files are listed in the tables below.
sda |
First hard disk |
sdb |
Second hard disk |
sda1 |
First partition of the first hard disk |
sdb7 |
Seventh partition of the second hard disk |
sr0 |
First CD-ROM |
sr1 |
Second CD-ROM |
ttyS0 |
Serial port 0, also referred to as COM1 |
ttyS1 |
Serial port 1, also referred to as COM2 |
psaux |
PS/2 滑鼠設備 |
gpmdata |
虛擬設備,中繼從GPM(滑鼠)服務傳來的資料 |
cdrom |
指向光碟機的符號鏈結 |
mouse |
指向滑鼠設備檔的符號鏈結 |
null |
Anything written to this device will disappear |
zero |
可以從該設備永無休止地讀出零 |