What is /dev?
In the Linux file system, everything is a file or a directory. Even devices are accessed as files. Your hard drive partitions, Pen drive, speakers, for all of these, there exists a file from which these are accessed. Now to understand how devices are accessed as files, think of it in this way: what do we do with a file? We read data from it and write data to it. A device like a speaker can input data to produce sound, a hard disk can be used to read and write data, a printer takes the input to print files, etc. Files and devices are similar in this way
/dev is a directory that stores all the physical and virtual devices of a Linux system. Physical devices are easy to understand, they are tangible devices like pen-drive, speakers, printers, etc. A Linux system also has virtual devices which act as a device but represent no physical device.
What is /Dev/Null in Linux?
If you have been learning shell programming, you may already have come across something like /dev/null. In this article, we will understand what it is and how it is used. Let’s start off by understanding what /dev is.