How to burn an ISO to a USB drive from the terminal

Sometimes you want to burn software onto SD cards or USB drives, so that you can easily install the software on other computers. In this case, I’m burning the latest version of Debian Linux onto a USB drive so that i can install it on my server.

Sure, you can use a graphical tool like Etcher to burn the software, but you can also accomplish this task from the Linux terminal using dd command.

Mario Seijo

1. Figure out the path to your USB drive

$ df -h

2. Burn the ISO to a removable USB drive

$ sudo dd bs=4M if=debian-10.6.0-amd64-netinst.iso of=/dev/sdb conv=noerror,sync status=progress

Let’s break down the command above

  • sudo – execute the command as the superuser
  • dd – data duplication
  • bs=4M – byte size, 4 megs
  • if=debian-10.6.0-amd64-netinst.iso – input file
  • of=/dev/sdb – output file, path to your USB drive
  • conv=noerror,sync – continue if you encounter read errors, and sync
  • status=progress – display progress

Use the dd command with caution, making sure you select the correct path to your USB drive.