2

My question is very basic in nature. Is the mount point for external media (like USB) always /media?

Because in a Debian system, if I plug in any USB device that goes to the /media folder. So is it the case with all the other Linux flavors like Fedora, Ubuntu, etc. If a USB device is automatically mounted will it always go to the /media directory?

I am not concerned about the name of the devices. I am looking for every external media (like USB) to be listed under /media directory so that my code can run on any flavor of Linux.

4

Well, up until a few years ago every distro did it their own way. Now there is a standard for directory layout (the Filesystem Hierarchy Standard, FHS) which most distros follow.

According to FHS, Media goes under /media. So yes, if your distro complies with FHS (most do), then mounted media will go under /media.

One catch: The FHS does not exhaustively describe how the entry under /media will be named. The names floppy, cdrom, cdrecorder, zip must be used, but there's no standard (yet) for USB drives. Also, there may be multiple drives, in which case numbers will be appended.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy