Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've mounted my USB disk to /mnt/kingston/ dir, and umounted it from there by typing in umount /mnt/kingston/.

But I can still see my USB disk after issuing the fdisk -l command. Why?

If I type in umount /mnt/kingston again, it shows: umount: /mnt/kingston; not mounted.

share|improve this question
1  
It's right: try to umount any HDD partition. –  Eddy_Em Mar 21 '13 at 5:40
add comment

1 Answer 1

up vote 5 down vote accepted

When you mount a partition, it will show in df -h, and if you umount it, then it will no longer show in df -h

fdisk -l uses /proc/partitions and prints out all partitions which are physically connected, but your USB drive is still connected to your PC. When you unplug it, then it will not show in fdisk -l anymore, and you can also check cat /proc/partitions for the same.

I think you are thinking from a Windows perspective, if not then let me know I will remove below content.

Let me clear these things:

  • df -h is the same as when you open Explorer (My Computer) and
  • fdisk -l is same same as the Device Manager and Disk Management.

After disconnecting(safely removed) a USB device in windows, it will still be shown in "Device Manager" under Universal USB Bus Controller

share|improve this answer
    
But in windows, if I unpluged the USB drive, neither will it show in the Device Manager nor Disk Management...:) –  Rubby Mar 21 '13 at 6:14
    
disconnect means safely remove . not physically disconnect –  Rahul Patil Mar 21 '13 at 6:25
2  
@Rubby, Windows turn off power of unmounted USB port. Linux don't do such unnecessary things. –  Eddy_Em Mar 21 '13 at 7:03
    
@Eddy_Em actually there are (or at least were) cases when Linux does such things with hotplug, but never with umount. –  David Kohen Mar 21 '13 at 9:42
add comment

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.