I/O devices in Linux fall into two categories: character devices and block devices. The two devices themselves are not strictly restricted, but are categorized based on different functions.
(1) Character devices: Provide continuous data flow, applications can be read sequentially, and usually do not support random access. Instead, this type of device supports reading and writing data by byte/character. For example, keyboards, serial ports, modems are typical character devices.
(2) Block devices: Applications can randomly access device data, the program can determine its own location to read data. hard disks, floppy disks, CD-ROM drives, and flash memory are typical block devices that an application can address anywhere on a disk and read data from it. In addition, data can be read and written only in multiples of blocks (usually 512B). Unlike character devices, block devices do not support character-based addressing.
To sum up, the fundamental difference between the two types of devices is whether they can be accessed randomly. Character devices can only be read sequentially, and block devices are randomly read.