How to mount a pen drive / External hard disk in linux

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.

How to mount a pen drive / External hard disk in linux
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.

#fdisk -l

The above command will help you to find out how many hard disk are connected in the linux machine.

How to mount a pen drive / External hard disk in linux

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.

#fdisk -l

How to mount a pen drive / External hard disk in linux

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.

#mkdir /media/pendrive
#mount /dev/sdb1 /media/pendrive
#ls -l /media/pendrive
#mount
#df -Th

How to mount a pen drive / External hard disk in linux

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.




Leave a Reply

Your email address will not be published. Required fields are marked *