Gangmax Blog

How to write an iso file to a bootable USB device using dd command

Previously I used “unetbootin“ to do such thing. However today I find it doesn’t work since my USB drive doesn’t show up in the “USB Drive” dropdown list. So I want to find a Linux command which can do the same thing. I find this and here is how to do it.

1
2
3
4
5
6
7
# 1. Check the USB drive device name. In my case it's "/dev/sdc",
# which will be used below.
df -Th
# 2. Umount the USB drive.
umount /media/auser/SANDISK
# 3. Write the iso file to the USB drive.
sudo dd if=ubuntu-mate-18.04.2-desktop-amd64-gpd-pocket.iso of=/dev/sdc bs=8M status=progress

Done. Very simple, right?

Here is the command to format a USB drive after the installation is over and you want to use it as a normal USB drive(from here):

1
2
3
4
5
sudo umount /dev/sdc1
sudo mkfs.ntfs /dev/sdc1
# Or:
sudo mkfs.vfat /dev/sdc1
sudo mkfs.ext4 /dev/sdc1

Updated on “2020-02-14”.

Today I’m writting an Ubuntu ISO image into an USB drive on Mac OS. Here are the instructions(from here):

1
2
3
4
5
6
7
8
9
# Plug the USB drive in Mac and use the following command to check the device identifier.
diskutil list
# In my case the identifier is "disk2s1".
# Unmount the volume.
diskutil umount /dev/disk2s1
# Write the ISO file content into the USB drive.
sudo dd if=./ubuntu-18.04.4-desktop-amd64.iso of=/dev/disk2s1 bs=10000000
# Mac version "dd" doesn't support arguments like "bs=8M" or "status=progress"
# which is a pity.

Comments