«

»

May 27

Mount Removable Drive in Unix

A computer running Linux may only make a few drives (e.g., partitions on a hard disk or on a flash drive) available, among all drives recognized by the system. Unlike Windows, Linux does not keep independent folder hierarchies on separate drives designated by different letters. Linux integrates the files stored on separate drives into the same folder hierarchy. Users add a new drive by “mounting” it, that is, by designating a folder in the global hierarchy under which the contents of the new drive will be placed. You can easily mount and unmount drives on Linux.

Mount

Insert your USB Removable drive.
You will similar message

kernel: umass0: vendor 0×0000 USB Mass Storage Device, rev 2.00/1.00, addr 2
kernel: da0 at umass-sim0 bus 0 target 0 lun 0
kernel: da0:
Removable Direct Access SCSI-2 device
kernel: da0: 40.000MB/s transfers
kernel: da0: 2000MB (4048000 512 byte sectors: 64H 32S/T 1000C)

Make a folder for mounting your drive data.

mkdir mnt

Now, Mount your drive.

mount_msdosfs /dev/da0s1 /mnt

Now you can check your data

Add or copy your data as per your need.

Unmount

Finally, Unmount your removable drive with following command.

umount/mnt

To pull out the USB memory unmounted.

Leave a Reply