[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NEWBIE question Re: static or dynamic /dev



Richard Owlett <rowlett@cloud85.net> writes:

> Roger Leigh wrote:
>> On Fri, Apr 05, 2013 at 05:42:32AM -0700, sting wing wrote:
>>> Question: how does a person know if their /dev is a static or dynamic /dev
>
>>
>> % findmnt /dev
>> TARGET SOURCE   FSTYPE   OPTIONS
>> /dev   devtmpfs devtmpfs rw,size=249844k,nr_inodes=62461,mode=755
>>
>> Unless you have taken very special steps to avoid it, you will
>> always have a dynamic /dev.  This has been the case for many
>> many years now.  udev uses a tmpfs mounted on /dev (and more
>> recently a devtmpfs mounted on /dev).
>>
>> If there's nothing mounted on /dev, then you will have a static
>> /dev.  However, if using Linux, the chances of having a static
>> /dev on a contemporary system are vanishingly small--you'd have
>> to intentionally alter the boot scripts to avoid a dynamic /dev.
>>
>
> What does it mean when /dev is said to be static? dynamic?
> What should I be reading about?

Many years ago, /dev was a directory containing entries called "special
files" (which essentially meant mappings from filenames to device
drivers).  It was the responsibility of the system administrator to make
sure that any time a device was added, a corresponding special file was
added to /dev.  In such a system, /dev is static.

In a modern system, /dev doesn't physically exist on disk at all:  it's
a special kind of filesystem that lives only in the memory of the
computer, called a tmpfs (temporary filesystem).  Daemons detect what
hardware is available, and automatically create the right special files
in this filesystem.  This is a dynamic /dev.


Reply to: