11
Jan

Difference Between ‘eject’ and ‘umount’

What I’ve Learned Today:

I had always figured that ‘eject‘ and ‘umount‘ were the same thing in that they both unmounted a drive whether USB Thumb Drive or CD-ROM. This isn’t entirely true. ‘umount’ will simply unmount the partitions for the disk, ‘eject’ will unmount the partitions as well as unmount the boot volume. The first example that comes to mind is the CD-ROM drive. If you had simply tried to ‘umount /dev/cdrom0’, the CD-ROM partitions would be unmounted, but the CD would still be stuck in the tray. With the ‘eject’ command, the CD-ROM would be unmounted and the tray would physically eject the media.

There are some devices out there that mount a pseudo (fake) CD-ROM drive, like SanDisk U3, that may need to be ejected depending on your application.

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 1 Comment So Far

  • Nevyn
    May 17th, 2010 at 9:42 pm

    I’ve just been looking at a communication device (WLAN) and it appears as if you need to eject it to get it to switch modes. It presents itself as two things:
    a) a mass storage device
    b) a communication device

    So KDE/Gnome tend to pick it up and mount it. The eject command (I assume the mount command wouldn’t help here) changes it’s product id in lsusb so you can then use it as a communication device.

Share your thoughts, leave a comment!