-1

Would you explain how to erase data from device connected through USB in terminal

1 Answers1

2

Ubuntu / Linux doesn't make a difference between a built-in drive or an external drive, e.g. a USB pen drive.

Open a terminal, navigate to the drive (usually mounted under /media/your_user_name and use either the rm command to delete single files or rm -r directory_name to delete a directory recursively. Or use one of the mkfs commands (e.g. mkfs.fat) for formatting the drive. Remember that for the latter the stick has to be not mounted.

noisefloor
  • 1,086
  • 2
    Welcome to AskUbuntu! I think the OP was asking how to erase a device, not how to remove a file or directory from said device, or place a filesystem on it it for that matter. – Elder Geek Jan 24 '24 at 02:52