Monday, May 2, 2016

How to unmount and mount pen drive in ubuntu via command line




How to unmount and mount pen drive in Ubuntu 14.04?



Thanks



A. Identify the pendrive with the following commands



sudo parted -ls
sudo lsblk -fm



best in a wide terminal window (to avoid line wrapping)



df -h


to check if it is already mounted



B. Create mount points with mkdir and mount with the mount command




sudo mkdir /mnt/sdn


Make the mount point only the first time; n can be a number 1 or 2 ...



sudo mount /dev/sdxm /mnt/sdn


x is the drive letter, m is the partition number




for example



sudo mkdir /mnt/sd1
sudo mount /dev/sdb1 /mnt/sd1


C. Unmount with umount



sudo umount /mnt/sdn



where n can be a number 1 or 2 ...



or



sudo umount /dev/sdxm


where x is the drive letter and m is the partition number identified according to the command lines in A. (parted, lsblk, df).


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...