Copy file to USB using Linux Command line

A good teacher should have a habit of using Linux command line for doing daily / routine jobs. Here we present how to copy file to usb using Linux command line, from your hard disk to attached USB.

Step #1 – First move into the directory where the source file is. In this example, I am trying to copy file “test.txt” which is my home directory to attached USB.

Step #2 – Now lets check, which device and mount point is assigned to attached usb, using “df -h” command. In my case the USB is recognized as “/dev/sdb1” and mounted under “/media/alok/RHTINST”. (your mount name will be different, but device will generally be recognized as /dev/sdb1)

Step #3 –┬áNow once we know the mount point. Now copy file to usb using Linux command. Its very simple to use “cp” command to copy the desired file using Linux CLI. In case you get “permission denied” error. Don’t panic. Just use “sudo” to complete the command, as I had shown.

Step #4 – Now just confirm the file existence in USB.