Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

I tried to create a bootable Ubuntu flash drive with dd method,

sudo umount /dev/sdb
sudo dd if=/path/to/ubuntu.iso of=/dev/sdb bs=1M

It create files on the USB disk, but when I try to boot the USB disk it shows a Operating System Not Found error.

share|improve this question
You have to make sure that your USB flash drive is NOT mounted. Check with lsblk. If necessary, do sudo umount /dev/sdb (probably sdb1, sdb2). Add ;echo $? after your dd copy command. So: sudo dd if=... of=... bs=4M; echo $? If the commandd ends, the returning value should be 0. – user85164 Nov 8 '13 at 7:21
i follwed your steps,but it also creates the same files as sudo umount /dev/sdb sudo dd if=/path/to/ubuntu.iso of=/dev/sdb bs=1M creates.It doesn't create any ubninit,ldlinux.sys,etc files which are mainly important a linux os to boot. – Avinash Raj Nov 8 '13 at 9:38
I would install grub on the MBR of the USB disk as a final step. – Elder Geek Jan 2 '15 at 15:45

Use dd.

 sudo umount /dev/sdc<?>  

where ? is a number, look it up. Then, next:

 sudo dd if=input.iso of=/dev/sdc

where input.iso is the input file, and /dev/sdc<?> is the USB device you're writing to.

This method is fast and has never failed me.

share|improve this answer
Really? Are you sure you have the correct .iso file name including path, and the correct /dev for your USB drive? How does it fail? Is there an error message, or does it just fail to boot? Are you sure the .iso isn't corrupt? – Marc Nov 16 '13 at 10:25
I just created a bootable Lubuntu live USB on a 2GB drive last weekend using this command, and used it to install Lubuntu on an old computer. – Marc Nov 16 '13 at 15:51
You could have a corrupt .iso. Have you checked it? Are you certain the .iso is actually a copy of something that is bootable? – Marc Nov 16 '13 at 16:00
Just tried this with a 14.04 install. Whatever automounts disks mounted it as iso9660 and I could navigate it just fine, but parted couldn't see anything on it (no partition table) and the BIOS didn't think it was bootable. – Jeremy Logan Dec 4 '14 at 22:46
Original question and most upvoted answer is the same person that said this method is not working for him. ;-) For me approved answer is not working and this one does. :-) Upvoting. – Drachenfels Mar 22 '15 at 19:18
up vote 52 down vote accepted

Creating a bootable Ubuntu USB flash drive from terminal

  • Place the ubuntu.iso file in any hard disk partition.

  • Then mount the ubuntu.iso file with the below commands in terminal:

    sudo mkdir /media/iso/
    sudo mount -o loop /path/to/ubuntu.iso /media/iso
  • Insert your USB flash drive. My drive is /dev/sdd. Here's a screenshot:

GParted screenshot

  • Your drive may be automatically mounted inside /media/. Let's assume that it was mounted in /media/xxx/.

  • Copy all files from /media/iso/ to your mounted USB flash drive by running the below command (make sure to include the dot):

    cp -a /media/iso/. /media/xxx/
  • Next, you need the ldlinux.sys file in your USB flash drive to make the USB bootable. My USB partition is /dev/sdd1; enter lsblk to see what's yours. Run the below commands:

    sudo apt-get install syslinux mtools
    sudo syslinux -s /dev/sdd1
  • Navigate to the /media/xxx mount folder and rename the isolinux directory to syslinux. Then go into the renamed folder and rename the file isolinux.cfg to syslinux.cfg.

  • Reboot your PC and change the boot order in BIOS to allow booting from a USB drive. Now your Ubuntu USB flash drive will boot and you can install it.

This method will work for any Linux distribution, not only Ubuntu. You don't need to install any third party software to make a Linux USB flash drive.

share|improve this answer
I am trying it at the moment, could you please specify what/why you use: cp -a rather than cp -r – moldovean Jul 19 '14 at 15:44
You need sudo for the syslinux command. – Cammy_the_block Nov 4 '14 at 4:55
This method did not work for me. The cp -a gives: 'cp: cannot create symbolic link ‘/media/xxx/./ubuntu’: Operation not permitted' and other of the like, since the target is fat32. I tried ignoring that... didn't work – sheß May 30 '15 at 12:26
Important to note that the usb must be a fat32 filesystem, otherwise syslinux will not work – Ricardo BRGWeb Nov 2 '15 at 1:22
The console shows me same error than @sheß. I verified filesystem (FAT32) and flag BOOT. – Chofoteddy Jan 4 at 18:07

You have two choices.

If you desire a graphical interface, use usb-creator (it is in the ubuntu repos)

enter image description here

If you want a command line tool, use dd

sudo umount /dev/sdb
sudo dd if=/path/to/ubuntu.iso of=/dev/sdb bs=1M

Just be sure "/dev/sdb" is the flash drive you wish to use (it will destroy the data on the flash drive).

See for additional information.

share|improve this answer
i want only command line tools,not gui tool(like startup disk creator).According to the dd method,only 3 folders and 1 file was created in my usb.While i trying to boot it says operating system not found error.Files like ubninit,menu.c32,ubnpathl.txt,ubnfilel.txt,ldlinux.sys are missing(which are very important to boot live ubuntu usb). – Avinash Raj Nov 8 '13 at 5:00
I tried the dd method with ubuntu.iso and it worked! it too a lot of time however to be written on an USB. I wonder what bs=1M stands for. I found this site . Now I wonder if changing the value will make to copying to the USB faster? And what are the risks.. maybe someone knows. – moldovean Aug 17 '14 at 7:42
The bs is the block size. dd will read 1MB of data into the memory and then proceed to write it at the disk as a whole. Using a very small block size you will get a lot of CPU overhead. Using a very big block size may result in unexpected side effects, e.g. longer pauses of no disk activity and/or big RAM usage. 1M or 4M usually is a good value when making a disk from an ISO. More info on block sizes:… – ApolloLV Nov 11 '14 at 18:28
I figure making a bootable usb is something I do infrequently, but when I do it, I want it done right. A smaller block size may take longer, but is that an issue? Nope. – Marc Feb 18 '15 at 21:44
@Marc - The only issue is speed, a smaller block size is no more or less error prone then a larger block size and thus a smaller block size != "done right". Done right means checking the md5sum of the iso and confirming the md5sum of the written image. Once you confirm the m5dsums you know it was done right. – bodhi.zazen Feb 19 '15 at 13:58

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

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.

share|improve this answer
+1 for mentioning sync. Without it, you have no idea if the content was actually copied. Also, if you're not in a hurry, you should md5sum both files just to be doubly-sure. – Dave Oct 15 '15 at 0:28
Maybe worth mentioning the USB may need to be (re)formatted as FAT32 with sudo mkfs.msdos -F 32 /dev/sdX first? – Nemo May 4 at 22:32
@Nemo, is it possible for that to make a difference? dd to /dev/sdX will overwrite any existing file system. – mwfearnley May 8 at 13:54
sync is pointless here. It only affects file system operations. – punund Jun 19 at 14:03

First, unmount the USB device and then use lsblk to verify the device.

Sometimes (usually older iso files) dd is not sufficient and the pendrive will not boot. In this case, you may need to install syslinux:

sudo apt-get install syslinux

and then run the following commands:

sudo mkfs -t vfat -I /dev/sdX

You want to run that last command to /dev/sdX and not /dev/sdX1.

Then, proceed with the following commands:

isohybrid /path/to/file.iso --entry 4 --type 0x1c
dd if='/path/to/file.iso' of=/dev/sdX bs=8M

or instead of dd, you can use cat instead:

sudo -s
cat /path/to/file.iso > /dev/sdX

share|improve this answer
$ dd if=ubuntu-14.04.1-desktop-amd64.iso of=/dev/sdX bs=1MB

Don't use the path to bit.

  1. Use the cd command to get to the folder that contains the .iso file
  2. use the command dd if=FILE NAME HERE.iso of=/dev/sdX bs=1MB
  3. Wait until the console output looks something like this:

    1028+1 records in
    1028+1 records out
    1028653056 bytes (1.0 GB) copied, 55.4844 s, 18.5 MB/s
  4. Boot from the usb.

Note: Make sure you write to the correct device a usb will not always be mounted at: dev/sdX where X can be any letter.

share|improve this answer
what is the significance of bs=1MB in dd command??? – juggernaut1996 Jan 25 at 12:56
@juggernaut1996 none. It's the block size to use when copying. Since no count argument was supplied it will copy the whole of the input in 1MB blocks. It could be removed. – CraftyThumber Jun 29 at 15:23

Format the card:

$ sudo mkfs.vfat -F32 /dev/sdx

Mount the ISO image:

$ sudo mount ubuntu.iso /mnt

Copy contents to card:

$ sudo cp -rvf /mnt/* /dev/sdx


  • rename isolinux folder into syslinux
  • rename syslinux/isolinux.cfg to syslinux/syslinux.cfg
  • rename syslinux/isolinux.bin to syslinux/syslinux.bin
  • run syslinux -s /dev/sdx
share|improve this answer
-1. Did you even test this? sudo cp -rvf /mnt/* /dev/sdx will not work (or at least not do what you intend). You don't copy files to a raw device (/dev/). Instead, you should mount the card and copy the contents of the ISO file to the card (mount point to mount point). And what's wrong with the current accepted answer which has the same approach. – gertvdijk Jan 2 '15 at 15:29

protected by Avinash Raj Feb 7 '15 at 15:12

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.