2

I would like to know if my definitions of devfs, devtmpfs and udev in Linux are clear and accurate.

devfs is the kernel implementation of /dev [Deprecated]. Does this get populated by the kernel like the case fordevtempfs? According to @Gilles answer yes it does. Then both devfs and devtempfs hardcode names of devices.

devtempfs is a temporary file system that that gets populated with device files by the kernel and is mounted on /dev.

udev is a daemon that listens to the kernel's uevents and matches the attributes of those uevents against certain predefined rules to perform device initialization, make useful symlinks, etc...

The current Linux implementation of /dev is devtempfs + udev.

What is right and what is wrong in my definitions?

3

Pretty much correct on udev and devtmpfs, with the caveat that udev is not required (pretty much, if you have no devices that need special handling from userspace and don't need the symlinks, you don't technically need udev).

As far as devfs, I think you're correct, but I'm not 100% certain. As a general rule, unless you're dealing with 10+ year old Linux systems (or poorly designed embedded devices), you don't have to worry about devfs.

  • It seems like devfs is the same as devtmpfs in that device files are dynamically populated by the kernel. – direprobs Jul 17 '17 at 11:39
  • 2
    See unix.stackexchange.com/q/161674/5132 for udev. – JdeBP Jul 17 '17 at 15:32
  • Just to mention that devfs has been obsoleted in Linux kernel 4.16, so technically we are now left with devtmpfs + udev (if needed). – Ivan Davidov Apr 8 '18 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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