usb0 -> what exactly is it for?

5,569

The directory /mnt is a fairly old directory where resources, such as HDDs, are often mounted into the system. They're typically mounted from /etc/fstab, but do not have to be exclusively mounted from there.

If you're wondering where a resource such as /mnt/usb0 is pointing to, or rather what device is "behind" it, you can use the df command to interrogate the situation a little further.

$ cd /mnt/usb0
$ df -h .

Example

Under several Linuxes the directory /media has become a pseudo standard location for mounting USB thumbdrives etc. On my laptop for example when I plug in a USB thumbdrive and cd to it's mounted directory it presents like so:

$ pwd
/media/KINGSTON

$ df -h .
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             7.5G  6.4G  1.2G  86% /media/KINGSTON

You can use the above to try and get a better understanding of the device, if any, that may be behind the mount point /mnt/usb0.

Share:
5,569

Related videos on Youtube

erch
Author by

erch

my about me is blink at the moment

Updated on September 18, 2022

Comments

  • erch
    erch over 1 year

    So far, I found out that on GNU/Linux /media/usb0 seems to be a mount point for Ethernet over USB. Nice.

    Question: Where is defined, what usb0 is exactly for?

    I distilled the above mentioned suspicion from a lot of discussions where usb0is mentioned for Ethernet over USB. But I can't find any definition. Is there a history behind this?


    EDIT: I found the following in FHS 2.3 definitions, section /media:

    On systems where more than one device exists for mounting a certain type of media, mount directories can be created by appending a digit to the name of those available above starting with '0', but the unqualified name must also exist.

    so the [updated/additional] question: Is usb0 meant for Ethernet over USB or is it just commonly used for this?

    • user2914606
      user2914606 over 10 years
      are you aware of the UNIX philosophy that everything is a file?
    • user2914606
      user2914606 over 10 years
      oh actually, nevermind. misread your question. still, though, I've never seen /mount/usb0 on my boxes. more than that, I've never seen /mount. that directory isn't in the Filesystem Hierarchy Standard, either.
    • erch
      erch over 10 years
      @strugee I am, yes. So what, beside the 0, makes the difference between fileand file0? Also: are you aware that one can delete comments if… for whatever reason ;)
    • Jeff Hewitt
      Jeff Hewitt over 10 years
      Is it possible you mean /mnt/usb0? If that's the case, I don't think it's meant to represent Ethernet over USB specifically. It's a generic mountpoint that can be used to automount removable media over USB. At least that's how things are on my Debian box.
    • erch
      erch over 10 years
      @JosephR. MY BAD! Edited /mount to media Thanks for the hint!
    • Jeff Hewitt
      Jeff Hewitt over 10 years
      @chirp No worries. I make that mistake a lot, too, because I'm used to sounding out the "mount" in my head whenever I think of /mnt (See also /temp mistaken for /tmp :D )
  • erch
    erch over 10 years
    MY BAD! SORRY!!! Edited /mount to mnt Thanks for the hint!
  • slm
    slm over 10 years
    @chirp - see updates.
  • erch
    erch over 10 years
    /media/usb is a softlink to /media/usb0 here (Debian based Crunchbang 10). Seriously, a softlink: Different inodes, differing in just one digit from /media/usb which has the lower inode and /media/usb0 having the exactly next inode available (!).