I. Hardware and equipment files
In the Linux system, the hardware devices are in the form of files, because different hardware devices have different file types, we refer to the hardware and system corresponding files are called device files. The device file provides an interface between the external device and the operating system, so that the user uses an external device as if it were a normal file.
1. Device files
The device file is stored under the Linux system under/ Dev , the device file naming method is mainly the main device number plus the secondary device number, the main device number indicates the device type, the secondary device number indicates which device is specified.
2. Floppy disk
The device files under Linux are /dev/fdx. The main device number FD is the abbreviation for floppy drive (FLOPPYDOSK), and the secondary device number x indicates the number of the floppy disk drive. For example,/DEV/DF0 represents the first floppy disk drive in the system.
3.U disk
The USB drive is recognized as a SCSI device under Linux and the device file is Dev/sdax, and the primary device number SD indicates that the SCSI disk,a represents the first SCSI device. If there is a second SCSI device, then the corresponding device file is/dev/sdb. x represents the corresponding partition number for the SCSI device. For example,/DEV/SDA1 represents the first partition of the first SCSI device.
4. Optical drive
IDE CD-ROM the corresponding device file for Linux system is/dev/had, which indicates the IDE CD-ROM of the first IDE port (Master), and the SCSI CD-ROM corresponding device file for Linux/dev/srx,x represents the SCSI ID. Many Linux distributions now have a CDROM device file in/dev, in fact/dev/cdrom is a symbolic link to the optical drive.
5. Tape
The device file for most SCSI tape drives under Linux is/dev/stx,st for "SCSI tape" and X is the number of the tape drive. For example, the device file for the first tape drive of the system is/dev/st0, and if there is a second one, the corresponding device file is/dev/ St1. etc
Two. common File system types
For different external devices, Linux provides different file types. The common types are as follows:
Msdos DOS File system type
VFAT a DOS Partition file system type that supports long file names and can also be understood as a Windows file system type
ISO9660 disc Format File system type
EXT2/EXT3 Linux File system type
Three. Mounting and use of the device
The Mount command under Linux is Mount, in the following format:
MOUNT-T file system type device name mount point
Linux Learning Notes (a) the use of external devices (i.e. mounts)