How to write/create a Ubuntu .iso to a bootable USB device on Linux using dd command

Posted on in Categories , , , last updated October 13, 2017

I downloaded a Ubuntu .iso file named artful-desktop-amd64.iso on a Debian Linux system. How do I write or burn a Ubuntu .iso to a USB device for installation purpose from Linux terminal?

You need to use the dd command to create a bootable USB stick to install Ubuntu Linux on your Laptop or Desktop. Creating a bootable Ubuntu USB stick is easy from Linux or Unix-like system such as MacOS.
bootable-ubuntu-dd-command

Step 1: Find your usb device name

Insert your USB stick and type the following df command to see if it is mounted automatically on a Debian Linux desktop:
$ df
Sample outputs:

Filesystem            1K-blocks    Used Available Use% Mounted on
udev                   16432268       0  16432268   0% /dev
tmpfs                   3288884   26244   3262640   1% /run
/dev/mapper/md0_crypt 491076512 9641092 456420380   3% /
tmpfs                  16444408  105472  16338936   1% /dev/shm
tmpfs                      5120       4      5116   1% /run/lock
tmpfs                  16444408       0  16444408   0% /sys/fs/cgroup
/dev/sdc1             122546800  124876 116153868   1% /boot
tmpfs                   3288880      24   3288856   1% /run/user/119
tmpfs                   3288880      72   3288808   1% /run/user/1000
/dev/sdd1               1467360 1467360         0 100% /media/vivek/data

You need to unmount /media/vivek/data:
$ sudo umount /media/vivek/data
Or
$ sudo umount /dev/sdd1
Another option is to run dmesg command to find out usb device name:
$ sudo dmesg
Sample outputs:

[461339.310378] usb 2-1.7: new high-speed USB device number 12 using ehci-pci
[461339.420453] usb 2-1.7: New USB device found, idVendor=0781, idProduct=558a
[461339.420457] usb 2-1.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[461339.420460] usb 2-1.7: Product: Ultra
[461339.420461] usb 2-1.7: Manufacturer: SanDisk
[461339.420463] usb 2-1.7: SerialNumber: FooBarNixCraftSerialNumber
[461339.421010] usb-storage 2-1.7:1.0: USB Mass Storage device detected
[461339.421457] scsi host6: usb-storage 2-1.7:1.0
[461340.431909] scsi 6:0:0:0: Direct-Access     SanDisk  Ultra            1.00 PQ: 0 ANSI: 6
[461340.432886] sd 6:0:0:0: Attached scsi generic sg4 type 0
[461340.433448] sd 6:0:0:0: [sdd] 121307136 512-byte logical blocks: (62.1 GB/57.8 GiB)
[461340.435434] sd 6:0:0:0: [sdd] Write Protect is off
[461340.435438] sd 6:0:0:0: [sdd] Mode Sense: 43 00 00 00
[461340.436405] sd 6:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[461340.449612]  sdd: sdd1 sdd2

It is clear that /dev/sdd is my usb stick device name.

Step #2: Create a bootable USB stick on Linux

Type the following dd command to create a bootable USB image from a .ISO file:
$ sudo dd if=artful-desktop-amd64.iso \
of=/dev/sdd bs=1M status=progress

The dd command will write process data to a usb stick (/dev/sdd)and a progress bar appears on screen. Once

Step 3: You are done

That’s all! You now have Ubuntu on a USB stick, bootable and ready to install on your Laptop, Desktop or server based system.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

1 comment

Leave a Comment