Device file&dev naming conventions

  1. Character devices
  2. Block devices
  3. Pseudo-devices
    • /dev/null
      • Accepts and discards all input; produces no output.
    • /dev/zero
      • Accepts and discards all input; produces a continuous stream of NULL (zero value) bytes.

Linux naming conventions

The following prefixes have come into common use in Linux-based systems, to identify the type of a device driver interface in the /dev hierarchy:

  • fb: frame buffer
  • fd: (platform) floppy disks, though this same abbreviation is also commonly used to refer to file descriptor
  • hd: (“classic”) IDE driver (previously used for ATA hard disk drive, ATAPI optical disc drives, etc.)
    • hda: the master device on the first ATA channel (usually identified by major number 3 and minor number 0)
    • hdb: the slave device on the first ATA channel
    • hdc: the master device on the second ATA channel
      • hdc1: first partition on this disk (example)
      • hdc5: first logical drive in the extended partition (example)
    • hdd: the slave device on the second ATA channel
  • lp: line printers (compare lp)
  • parport, pp: parallel ports
  • pt: pseudo-terminals (virtual terminals)
  • SCSI driver, also used by libATA (modern PATA/SATA driver), USB, IEEE 1394, etc.
    • sd: mass-storage driver
      • sda: first registered device
        • sda4: last partition on this disk (example)
        • sda6: second logical drive in the extended partition (example)
    • ses: Enclosure driver
    • sg: generic SCSI layer
    • sr: “ROM” driver (data-oriented optical disc drives; scd is just a secondary alias)
    • st: magnetic tape driver
  • tty: terminals
    • ttyS: (platform) serial port driver
    • ttyUSB: USB serial converters, modems, etc.
posted @ 2013-08-22 11:28  distric10  阅读(108)  评论(0)    收藏  举报