Guide  When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works.

How to write Windows to a USB device using Linux

A Windows 11 logo

Many years ago, probably around 2015, I ditched Windows altogether, opting to run Linux on my computers. Aging hardware was a key motivator, so was the perceived speed of Linux and its alignment with my needs (I don't do PC gaming).

Recently, however, I've needed to run a piece of obscure software that only runs on Windows. The other day, I spent several hours backing up my files, shrinking my Linux partition, writing Windows 11 to a USB, and installing it on a partition on my laptop.

Perhaps the most difficult part of all this, at least if I didn't have some stellar instructions, is writing Windows to USB. Unlike Linux distributions, you can't just use GNOME Disks and restore the disk image, it takes a more specialized approach. In this guide, I want to outline the steps I took so that you can create Windows installation media yourself should you need to.

The following commands are aimed at Ubuntu-based distributions as they are what most people have, on other systems like Fedora, you can mostly follow along but software installation commands are a bit different. The following instructions are for the WoeUSB terminal tool which I have tested and can confirm works. There is also a graphical tool called WoeUSB-ng, however, I have not tested this myself and do not know how well it works.

The first thing we need to do is install WoeUSB. I think there is a graphical version of this tool, but for this guide I will be explaining how to use the command line version as I have tested this method.

First, add the WoeUSB repository with this command:

sudo add-apt-repository ppa:tomtomtom/woeusb

Next, you need to run:

sudo apt update

Once you've pulled in the data from that repository, you can go ahead and install WoeUSB from there with this command:

sudo apt install woeusb

Great, if everything has gone smoothly, you should have WoeUSB installed. Next, you'll want to prepare your installation media, but don't plug it in just yet.

Instead, run the following command:

lsblk

Take note of the output here; towards the end of the output you should see your storage mediums and their partitions, designated with 'disk' and 'part', as well as their storage sizes. Now that you know which are your hard drives, go ahead and plug in the USB you want to write Windows to, and run lsblk again and see which disk was not in the list before, this is your USB device.

The information you really need from the lsblk output is the identifier of your USB disk; in my case, it was sdb.

WARNING: Following instructions beyond this point will lead to the destruction of data on your USB device (and potentially your hard drive if you don't follow the instructions closely).

Now that we have this, and assuming you've already downloaded Windows, you can write Windows to your USB device with the following command. If it makes things easier, you can remove the Windows ISO path and surrounding quotes and just drag your Windows download onto the terminal and the path will be auto-inserted, helping you avoid mistakes. Also, replace sdX with your disk's actual name, such as sdb in my case.

sudo woeusb --target-filesystem NTFS --device '/path/to/file.iso' /dev/sdX

The installation of Windows to your USB device will take several minutes, depending on the speed of your hardware, but once the installation has completed, you can reboot your computer and install Windows from for USB device.

WoeUSB tool in terminal

Installing Windows alongside a Linux installation is beyond the scope of this guide, but if you want to explore, I recommend installing Linux Mint Xfce on another USB device to resize your hard drive with GParted. Be sure to back up your data before resizing the drive. If you install Windows to the new partition, and you have any boot issues, you can boot back into Linux Mint Xfce and use the pre-installed boot repair tool, allowing you to choose Linux or Windows at startup.

Report a problem with article
Depiction of cybersecurity
Next Article

Save 86% on an Ultimate Cybersecurity & IT Career Certification Pathway Training Bundle

AMD Ryzen 5000 lineup
Previous Article

AMD makes it impossible to ignore 8-core Ryzen 5800XT if you want an AM4 CPU upgrade [Update]

Join the conversation!

Login or Sign Up to read and post a comment.

54 Comments - Add comment