Linux tips and tricks

How to mount and copy from a pen drive using the terminal in any flavour of Linux.

 

The following steps will tell you how to copy from pen drive to a local host.

  1. Insert the pen drive
  2. Use this command

    fdisk -l

  3. This command views the devices attached to the local host as shown in the figureNew pg1 edited
  4. Sometimes the pen drive will be mounted in

    /media/

  5. Else you can create a folder using

    mkdir /mnt/usb/

  6. Now to mount the pen drive onto the /mnt/usb use the following command

    mount /dev/sdb1/ /mnt/usb/

  7. The process can be seen as the following figure:pg 6
  8. Now let’s copy something from the pen drive to the local host
  9. To copy, use the following command:

    cp /mnt/usb/<file_name> <destination_addr>

  10. In the following figure, I’ve used /media/DRAGON as the source and /home/spawan/Desktop as the destinationpg 4.png
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s