Write Image (ISO) file to USB with Command Line in Linux Mint / Ubuntu

Bootable USB

For creating a bootable USB drive or writing an ISO file to USB flash drive, the Linux Mint has GUI program “USB Image Formatter“, which works fine but many of us sometimes prefer using command line terminal for the same. Let’s find out how to write an ISO file to a USB flash drive with command line terminal.

To writen an Image file follow the following steps :

1.  Insert the USB flash drive in the USB port of your system.

2. Before doing anything , you have to first format the flash drive. So follow the following video from YouTube for the same. Video link : https://www.youtube.com/watch?v=6IuM2RHX6UQ

3. Next, with USB connected to you system , open the command line terminal (Ctrl+Alt+t) and find the device partition table. Run the command :

sudo fdisk -l

The disk partition of USB flash drive will reflect at the bottom of the command output. It should go something like as shown in the image here. In  my case the disk partition is “/dev/sdb1”. Note that down .

Display Partition Table

4. Next, unmount the flash drive. Run the following command followed with password if prompted :

sudo umount /dev/sdb1

Note : Replace “/dev/sdb1” with your own partition address found in step 2 above.

5. Finally with “dd” and “sync” command line utility, we are going to write the ISO file to our USB flash drive. Here’s the command to run :

sudo dd if=/path/to/linuxmint.iso of=/dev/sd1 bs=4M && sync

Give the correct path to your ISO file or else it would return error. In my case the path to Linux Mint ISO file is :

Command for umount and writing iso file

6. Wait for the process to complete. Writing the ISO file to the flash drive would take few minutes. The final output would reflect the total bytes copied and time taken for completing the process along the speed.

Final Output for ISO image file writing to the USB flash drive

7. Finally, you can disconnect the USB flash drive from it’s port. The image file is now successfully written to usb stick.

Leave a Reply

Your email address will not be published. Required fields are marked *