Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a format of names of devices in /dev. I know there are conventions like sd maps to a disk. I was wondering however if the kernel forces a specific format? I noticed when I tried to attach a device to an arbitrary location like /dev/helloworld, it failed (on AWS).

Thanks!

share|improve this question
    
The failure you mention may have nothing to do with the device name. The association between the device driver (what you seem to be referring to as the device) and the device node (what you seem to be referring to as the device name) is through the major and minor device numbers. –  sawdust Sep 17 '12 at 21:35

1 Answer 1

The initial names of device nodes are set by the respective drivers, but if you know which major/minor numbers a driver uses, you could create other device nodes. (See here for a somewhat incomplete and outdated list.)

For many modern devices, minor numbers are chosen dynamically, so your best bet would be to create a symbolic link to some existing device node, like this:

ln -s /dev/tty /dev/helloworld
echo Hi! > /dev/helloworld

Your system is likely to have many udev rules to create such symbolic links; look into /etc/udev/rules.d/ or /lib/udev/rules.d/.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.