Cat/proc/devices and Ls/dev

Source: Internet
Author: User

For beginners, the Linux framework is too large, and many knowledge points need to do their own to understand

Device file, device number #ll-A/dev in each line you can see the device file, device number (primary, secondary)
For each hardware device, the system kernel has the appropriate device driver responsible for handling it. In Unix, a device file is used to represent a hardware device, and each device driver is abstracted into the form of a device file , giving the application a consistent file interface that facilitates communication between the application and the operating system.

As a rule, all device files are placed in the/dev directory.

The device in/proc/devices/is loaded into the kernel by Insmod , which produces a major for Mknod as a parameter. Cat/proc/devices


/dev/*.* is by Mknod plus go, format: Mknod Device1 c/b Major minor such as: Mknod DR1 C 254 0, the user through this device name to access your driver. Ls/dev

If there is an order Mknod Doc B 62 0:
The doc is defined by the name, B refers to the block device, and 0 refers to the entire doc. If you change 0 to 1, then 1 refers to the first partition of Doc. 2 is the 2nd one, and so on.

Turn from

http://blog.csdn.net/cainiao413/article/details/6181062

Cat/proc/devices and Ls/dev

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.