How to mount a pen drive / External hard disk in linux
In this post i am going to explain about how to mount pen drive or external hard disk in linux. Previously we have seen how to mount NTFS file system in linux and how to mount CD/DVD in linux command prompt.
In a real time production environment if i want to copy data from pen drive or external hard disk to a linux machine. The first basic thing I need to do is mount the pen drive or external hard disk in to the linux operating system.
Here I am going to explain the steps to mount a pen drive or external hard disk in linux using commands. Lets see how to do that with an example.
In my scenario i am going to mount pen drive in my linux machine from command prompt. Lets find out how many hard disk are connected to linux machine using below command, Don’t connect pen drive right now.
The above command will help you to find out how many hard disk are connected in the linux machine.
The screen shot is saying their is only one hard disk available and it is “/dev/sda” with “500GB” of size. We are clear that their is only one hard disk with 500GB of size.
Connect the pen drive now in the linux machine and hit the below command.
Right from the above image you can analysis that a new drive with name “/dev/sdb” with “4051MB” of size and one with partition “/dev/sdb1″ is available. The above image tells us that the size of pen drive is 4GB.
Ok! No more waiting. Lets mount the pen drive in to linux box.
I have created a directory called pendrive inside /media. The destination mount point of the partition /dev/sdb1 is /media/pendrive.
#mount /dev/sdb1 /media/pendrive
#ls -l /media/pendrive
Give mount command or df -Th command to verify the mount partition. As you can see that /dev/sdb1 is mounted on /media/pendrive. That’s it pen drive is mounted successfully.