8

I read about devfs(known as device file system ) to facilitate device driver programming as mentioned in linux device drivers text . How different is devfs from /dev directory in linux.Are they both same ?, i'm quite confused .

Santhosh Pai
  • 2,535
  • 8
  • 28
  • 49

1 Answers1

17

/dev is a directory. It tends to have mostly device nodes in it.

devfs is an obsolete and no longer available virtual filesystem that automatically generated the contents of /dev on some older versions of the Linux kernel. These days, it has been replaced by udev, a daemon that manages the contents of /dev in a temporary filesystem, or by devtmpfs, which is a lightweight replacement for devfs that is used in some minimal systems.

jpaugh
  • 6,634
  • 4
  • 38
  • 90
  • 4
    Just as a side note, AFAIK, `devfs` is still being used in other unix-based OS, like macOS. – Yoav Aharoni Oct 25 '16 at 22:37
  • 1
    @YoavAharoni True, after a sense. But the devfs that used to exist in Linux was entirely Linux-specific. The ones that exist in XNU (macOS/iOS) and various BSDs are completely separate implementations; the only things they had in common were their names and their general purpose. –  Oct 25 '16 at 23:09
  • @duskwuff "used in some minimal systems." `udev` is certainly not restricted to minimal systems! Most distros I know of use it. – jpaugh Sep 07 '17 at 19:13
  • @jpaugh You're parsing that sentence incorrectly. devtmpfs is what's used in some minimal systems, not udev. (Although nowadays that's increasingly rare.) –  Sep 07 '17 at 21:22