Create a bootable Ubuntu USB flash drive from terminal

How to create a bootable Ubuntu USB flash drive from terminal
A way to create a bootable Ubuntu USB flash drive from the terminal without using any third-party applications like YUMI,Unetbootin, etc.

We can use dd.

 

It is best to run sync

sudo umount /dev/sdX
sudo dd if=/path/to/ubuntu.iso of=/dev/sdX bs=4M && sync

where sdX is your usb device (this can be verified with lsblk).

The sync bit is important as dd can return before the write operation finishes.

On a Mac use lowercase for bs=4m:

If USB drive does not boot, it is because the target is a particular partition on the drive instead of the drive. So the target needs to be /dev/sdc and not dev/sdc <?>  For example:  /dev/sdb .

You’re almost there with dd, but you’re missing a step.

Read more at askubuntu.com