What is the command to copy a file to a pendrive in Ubuntu terminal?

  • 6
    The same way you file copy to anywhere else. Where in the filesystem is your pendive mounted?
    – user535733
    Sep 17, 2021 at 18:16

1 Answer 1


When you insert your pendrive, it is automatically opened in the GUI. Press Ctrl+L in the file manager window to see the path where your pendrive is actually mounted (it will be usually /media/username/label where username is your username, and label is the label given to your pendrive when it was formatted). In the terminal, just copy files to this path using cp command: cp filename.txt /media/username/label.

Not the answer you're looking for? Browse other questions tagged or ask your own question.