Linux Device File Name

Source: Internet
Author: User
All devices recognized by the Linux kernel are recorded in Src/documentatioN/ Devices.txtFile, as follows:

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
Device Type of the master device number
Device No. = Brief description of file name
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
0 Unnamed devices, such as empty devices mounted
0= Leave the device number empty
1 Char memory device
1 = / Dev / Mem direct access to physical memory
2 = / Dev / Kmem access to memory after kernel Virtualization
3 = / Dev / Null null device. Any write will be discarded directly, and any read will get an EOF
5 = / Dev / Zero zero byte source, can only read an infinite number of zero bytes
8 = / Dev / Random random number generator, which is completely generated by user input;
If the user stops all actions, the user stops generating new random numbers.
9 = / Dev / Urandom is faster, but it is not safe enough to generate random numbers by using random numbers;
If the user stops the operation, the generated random number is used as the seed meter to generate a new random number.
11 = / Dev / Kmsg any write to this file will be used as the printk output
1 Block RAM disk
0 = / Dev / Ram0 1 RAM disks (initrd can only use ram0)
1 = / Dev / Ram1 2 RAM disks
...
4 Char tty (terminal) Device
0 = / Dev / Tty0 current virtual console
1 = / Dev / Tty1 1 Virtual consoles
...
4 Block if the root file system is mounted in read-only mode, it is impossible to create a real device node,
This device is used as the alias of the dynamically assigned master (Major) device.
0 = / Dev / Root
5 Char other tty Devices
0 = / Dev / Tty current tty device
1 = / Dev / Console / Dev / Tty0)
7 Block loop device (simulating a block device with a common disk file)
Binding a loop device is handled by Mount (8) or losetup (8 ).
0 = Dev / 1oop0 The 1 Loop Devices
1 = Dev/ 1oop1 The 2 Loop Devices
8 Block SCSI disk ( 0 - 15 )
0 = / Dev/ SDA 1 SCSI disks {entire disk)
16 = / Dev / SDB 2 SCSI disks {entire disk)
32 = / Dev / SDC 3 SCSI disks (entire disk}
...
The partition representation is as follows ( 3 SCSI disks)
33 - / Dev / SDC 1 The 1 Partitions
34 - / Dev / Sdc2 2 Partitions
10 Char non-serial mouse, various miscellaneous devices and features
1 = / Dev / Psaux PS/2 mouse
135 = / Dev / RTC real-time clock)
13 Char core Input Device
32 = / Dev / Input / Mouse0 1 Mouse (s)
33 = / Dev / Input / Mouse1th 2 Mouse (s)
...
63 = / Dev / Input / Unified all the mouse of Mice
64 = / Dev / Input / Event0 1 Event queues
65 = / Dev/ Input / Event1 2 Event queues

29 char universal frame buffer device
0 = / Dev / fb0 1 frame cache devices
1 = / Dev / Fb1 2 frame cache devices

89 char I2C bus interface
0 = IDEV / I2C - 0 1 I2C adapters
1 = IDEV / I2C - 1 2 I2C adapters

136 - 143 Char unix98 Pty slave
These device nodes are automatically generated (with appropriate permissions and modes) and cannot be created manually.
The method is to use the appropriate mount option (normally, mode = 0620, gid = <"tty" group GID > )
Mount the devpts File System / Dev / PTS directory.
0 = / Dev / PTS / 0 The 1 Unix98 Pty slave
1 = / Dev/ PTS / 1 The 2 Unix98 Pty slave

180 Char USB character device
96 = / Dev / USB / Hiddev0 1 USB man-machine interface device (mouse / Keyboard / Game pole / Tablet, etc)
...
111 = Dev / USB / Hiddev15 16 USB Man-Machine Interface Devices
180 Block USB Block devices (such as USB flash drives)
0 = / Dev / UBA 1 USB Block devices
8 = / Dev / UBB 2 USB Block devices
16 = / Dev / UBC 3 USB Block devices

 

From Weizhi note (wiz)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.