How to Flash a USB Stick
By Vikram S. Negi on Jan 18, 2026
Flashing an .iso file to a USB stick is an important step in installing operating systems on a modern hardware. This process can be entirely done on the command line, I prefer this method as it is more reliable than using a GUI application. We will be using the dd command to accomplish our goal.
Warning:
ddis a powerful and dangerous command. If you specify the wrong output device, you can permanently erase data on your main drive.
Identify USB Device
First step is to know the correct name for your USB stick (e.g. /dev/sdb). Next we must understand that we need to format the whole device and not just a partition.
List all the block devices:
lsblk
# OR
sudo fdisk -l
Find your USB stick. It will usually be named something like /dev/sdb. Pay attention to its size to confirm it is your USB drive and not some other disk.
Note: From this point forward, replace
/dev/sdXin the commands with your actual device.
Unmount the USB Device
If your system automatically mounted the USB stick's partitions, you need to unmount them before using dd.
Unmount all partitions of your USB device:
sudo umount /dev/sdX1
sudo umount /dev/sdX2
# ... and so on for any other partitions
If umount complains the device is busy, make sure no file manager, terminal, or other application is accessing it. Sometimes simply closing the file manager window showing the USB contents is enough to unmount it.
Flash the ISO
Now, execute the dd command. Here is an example of how to flash your USB stick with an .iso file.
sudo dd if=/path/to/image.iso of=/dev/sdX bs=4M status=progress conv=fsync
The process can take several minutes depending on the size of the ISO and the write speed of your USB stick.
Synchronize Data to Disk
Even after dd reports completion, some data might still be in the kernel's write buffer. It's good practice to explicitly flush these buffers to the disk.
sudo sync
Wait for this command to complete (it will return to the prompt after flushing).
Safely Remove the USB Stick
You can now safely remove your USB stick. It should be bootable.
sudo eject /dev/sdX
Conclusion
Hopefully this simple guide to using the command line for flashing an .iso file to a USB stick is useful. Command line is my preferred choice for flashing a USB stick, it provides more transparency and reliability than a traditional GUI application.