Published Book on Amazon
![]() |
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1 |
![]() |
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2 |
출판된 한글판 도서
![]() |
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상) |
![]() |
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하) |
Original Book Contents
14.1.2 Character Device
14.1.2.1 Charateristics
The character device is the simplest of all Linux devices, and it inputs and outputs data in character unit when processing data in the device, and there is no intermediate buffer.
The "/dev" file is created with "mknod" command. Once created, it is maintained regardless of the existence of the actual device. Therefore, even if the device does not actually exist, the "/dev" file may be created. Linux can open, read, and write these block devices using standard system functions as if it were a single file in other programs.
14.1.2.2 Naming Rules for Device
The device name is defined in the format of <device type> + <device number>:
■ Device type
For example, "console" is defined as "tty". The device type will be discussed further below.
■ Device number
The device numbers are given in the order of 0, 1, 2, 3... according to the order in which they are installed by the same device type. For example, "tty0" means the first device 0 installed with the console "tty" type.