0

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)?

3

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.

| improve this answer | |
2

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

| improve this answer | |
  • 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). – Justin Krejcha 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. – Justin Krejcha 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.