In Linux, there is the /dev directory, which is a special directory which contains all of the files for devices and other things like random, urandom, etc.

Why did this directory exist? Was it just an artifact that never got removed from the Linux kernel (and couldn't really for compatibility)?

  • 2
    Read the answers to Why is “Everything is a file” unique to the Unix operating systems? As Linux is compatible with Unix, the same applies. Also while /dev was inherited from Unix, it's not an artifact because even modern programs depend on it. – Cristian Ciupitu Jun 1 '14 at 19:06
  • @CristianCiupitu I see now. At first, it seemed weird, but I get it. Thanks for pointing me in the right direction. – a-- Jun 1 '14 at 19:13
  • Why "infamous"? – Matteo Jun 1 '14 at 19:43
  • @Matteo I guess I thought it was. – a-- Jun 1 '14 at 21:22
  • 2
    Windows has a similar concept by the way, the Object Manager. – Daniel B Jun 5 '14 at 15:27

One of the philosophies in linux is that everything is a file, encoded or not, it is a special directory as you said. Linux, unlike windows is highly customizable and this is a way that the administrator has to create and manipulate devices and so on.


It exists to contains all of the files for devices and other things like random, urandom, etc.

  • seriously, I don't know what you're looking for with this question. Where else would you put all of those things if not in /dev ? – Sparr Jun 1 '14 at 19:00
  • I guess for random, urandom, and some others it could be done with a call (that's what reading from these files does anyway if I'm not mistaken). – a-- Jun 1 '14 at 19:04
  • @justcool393 requiring a call means you couldn't use command line file-manipulation tools to interact with the devices. being able to cat to a serial port, or grep /dev/mem, are very powerful capabilities. – Sparr Jun 2 '14 at 1:40
  • I get how being able to do that would be very useful. I guess I just wasn't use to it. – a-- Jun 2 '14 at 4:27

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.