Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I'm understanding correctly, a Device file name is the reference to the device found in /dev. The mount point is wherever the file system is accessible, but what is the role of the virtual directory that the mount point is in? Is there any reason it isn't considered a "real directory" or is this an antiquated historic term?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

A device file is a special kind of file which does not label any piece of data on a disk but rather serves as an interface to the kernel; device files are made with mknod. They're typically in /dev, but that's conventional.

Linux has only one directory structure starting at the root /, but many different filesystems can be mounted into the structure by mounting them to particular subdirectories. There's nothing special about the containing directory, but if it isn't empty, then you can't access its contents if you mount some other file system over it.

In general mounting of filesystems is transparent and you can't know just by looking at the path in which physical filesystem you currently are. Type df . to find out.

share|improve this answer
    
OK, if there is nothing special about the directory the mount is in, perhaps the term "virtual directory" is an antiquated term. –  Ross Charette Jun 29 '11 at 23:57
1  
@Ross: The entire Linux directory structure is "virtual" in the sense that it doesn't reside on any one file system. Perhaps if you compare this to DOS file systems where everything is "real" you might want this term. Personally, I'd reserve "virtual directory" for something like what a webserver exposes -- it looks like a directory structure, but it sort of isn't. –  Kerrek SB Jun 30 '11 at 0:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.