How to create a bootable USB drive using cmd (command prompt)


First of all, a bootable flash drive is intended for installing, reinstalling or restoring an operating system. The following instructions describe how to create a bootable flash drive from the command line using the Diskpart utility.

The advantage of this method of creating a bootable flash drive is the use of standard operating system tools, as well as the fact that the bootable flash drive is universal and it can be used to install on any computer or laptop. Modern computers and laptops are produced with the UEFI interface instead of the usual BIOS.

The UEFI interface supports FAT32 as the file system, which means that it can only boot from media formatted to the FAT32 file system.

Also from such a bootable flash drive you can install an operating system on a computer or laptop with a regular BIOS, which makes the bootable flash drive universal.

The process of creating a bootable flash drive consists of preparing a usb flash drive in the command line and copying files to it.

Preparing a bootable USB drive at the command prompt

Prepare a USB flash drive of sufficient size and insert it into the USB port of your computer.

Run the command prompt as administrator and execute the commands below one by one:

Run the DiskPart utility by running the command:


To display all connected drives, run the command:

list disk

Next you need to choose our flash drive. You should be guided by the size of the disk, in this case usb flash drive with 8 GB capacity is marked as Disk 2 (in your case it can be different number).

To select the flash drive, run the following command:

select disk 2

Now you need to erase the flash drive by running the command:


Next, create a partition on the flash drive by running the command:

create partition primary

Then select the created partition by running the command:

select partition 1

Now mark the selected partition as active by running the command:


Next, perform a quick formatting of the flash drive to the FAT32 file system with the command:

format fs=fat32 quick

And after a successful formatting, it remains to assign a drive letter to the flash drive by running the command:


To exit the Diskpart utility, run the command:


Close the command prompt window.

Copying files from Windows 10 iso image to a bootable USB drive

To copy the files from the iso image, we will use the standard means of the operating system, which appeared since Windows 8. Double left-click on the iso-file of the operating system image or right-click and select Mount in the context menu that appears.

The operating system image will open in the virtual disk drive. Select all the files, right-click and choose Copy in the context menu. Or press Ctrl+A to select all files and then press Ctrl+C to copy.

Open the bootable flash drive you prepared earlier from the command prompt, then right-click on the empty space and choose Paste from the context menu or press Ctrl+V.

This will start the process of copying files to the flash drive.

Once the file copying process is finished, the bootable Windows 10 flash drive is ready.

You can extract the mounted Windows 10 image whose contents were used to copy operating system files from the virtual disk drive by right-clicking on it and choosing Eject from the context menu that appears.

This way you can create a bootable flash drive with Windows 10 at the command line without the use of third-party programs. Prepared in this way, the flash drive can be used to install the operating system on any computer or laptop with UEFI interface or conventional BIOS, and regardless of the hard drive partitioning – GPT or MBR.

Rate article
Windows 10, Microsoft news, device reviews, registry and tweaks
Add a comment