Skip to content

Instantly share code, notes, and snippets.

@hungneox
Last active May 13, 2024 23:28
Show Gist options
  • Save hungneox/1831e86982f7d8ee430f4b594fa4f223 to your computer and use it in GitHub Desktop.
Save hungneox/1831e86982f7d8ee430f4b594fa4f223 to your computer and use it in GitHub Desktop.
How Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal

Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.

Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).

But what if you don't have a second PC for setting up that USB storage drive in the first place?

In this tutorial we'll show you how you can set this up from a Mac.

Step 1: Download the Windows 10 ISO file

You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.

If you want an English-language version of the latest update of Windows 10, you can download the ISO here.

If you have a relatively new computer, you probably want the 64-bit version. If you're not sure, go with the 32-bit version to be safe.

If you want a non-English-language version of Windows, or want to get an older update version, download the ISO here instead.

Step 2: Insert your USB storage drive into your Mac

The ISO file is only about 5 gigabytes, but I recommend you use a USB drive with at least 16 gigabytes of space just in case Windows needs more space during the installation process.

I bought a 32 gigabyte USB drive at Walmart for only $3, so this shouldn't be very expensive.

Stick your USB drive into your Mac. Then open your terminal. You can do this using MacOS Spotlight by pressing both the ⌘ and Space bar at the same time, then typing "terminal" and hitting enter.

Don't be intimidated by the command line interface. I'm going to tell you exactly which commands to enter.

Step 3: Use the diskutil command to identify which drive your USB is mounted on

Open Mac Spotlight using the ⌘ + space keyboard shortcut. Then type the word "terminal" and select Terminal from the dropdown list.

Paste the following command into your terminal and hit enter:

diskutil list

You will see output like this (note - your Mac's terminal may be black text on a white background if you haven't customized it).

diskutil list

Copy the text I point to here. It will probably be something like

/dev/disk2.

Step 4: Format your USB Drive to work with Windows

Next format your USB drive to Windows FAT32 format. This is a format that Windows 10 will recognize.

Note that you should replace the disk2 with the name of the your drive from step 3 if it wasn't disk2. (It may be disk3 or disk4).

Run this command using the correct disk number for your USB:

diskutil eraseDisk ExFAT "WIN10" GPT /dev/disk2

Then you'll see terminal output like this.

diskutil eraseDisk

This will probably only take about 20 seconds on a newer computer, but may take longer on an older computer.

Step 5: Use hdiutil to mount the Windows 10 folder and prepare it for transfer.

Now we're going to prep our downloaded ISO file so we can copy it over to our USB drive.

You will need to check where your downloaded Windows 10 ISO file is and use that. But your file is probably located in your ~/Downloads folder with a name of Win10_1903_V1_English_x64.iso.

hdiutil mount ~/Downloads/Win10_1903_V1_English_x64.iso

Step 6: Copy the Windows 10 ISO over to your USB Drive Now run the following command to copy your Windows Win10_1903_V1_English_x64.iso to your USB drive.

cp -rp /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WIN10/

Step 7: Put your USB into your new PC and start loading Windows

Congratulations - your computer now should boot directly from your USB drive. If it doesn't, you may need to check your new PC's BIOS and change the boot order to boot from your USB drive.

Windows will pop up a screen and start the installation process.

Enjoy your new PC, and your newly-installed copy of Windows.

@keithorange
Copy link

Hello @selasegithub.

1. Get the latest version of WinDiskWriter from the [Release](https://github.com/TechUnRestricted/windiskwriter/releases/) page.
   <img alt="image" width="214" src="https://user-images.githubusercontent.com/83237609/275045385-616cd676-cfe6-40d9-8fe9-a76bb1fcc664.png">

2. Extract the archive by double-clicking on the downloaded .zip file [If not done automatically by your browser]

3. Do the "Control + Mouse Click" on the WinDiskWriter application.
   <img alt="image" width="314" src="https://user-images.githubusercontent.com/83237609/275046073-5f2a19ac-2b3a-4330-817e-cea927afa467.jpg">

4. Due to the abcense of Apple Developer Signature in my App, you will see the following message:
   <img alt="image" width="372" src="https://user-images.githubusercontent.com/83237609/275046224-06879ee6-46b6-4223-8ad9-a946a68692d5.png">
   You need to do the 3rd step again.

5. Now you should get the "Open" option:
   <img alt="image" width="372" src="https://user-images.githubusercontent.com/83237609/275046718-3d346fe1-f6c8-40b4-a04f-7eb6d0591e34.png">
   Click on it.

Congrats! Now you have a working WinDiskWriter πŸ‘.

If you need more details, you can check my detailed guide on dev.to.

@TechUnRestricted plz add this to README!!!!! much thanks

@barbarapatton405
Copy link

Thanks, but i bought windows 10 pro from a Microsoft partner https://s2keys.com/, key activated without any problem.

@100ferhas
Copy link

100ferhas commented May 4, 2024

@TechUnRestricted thank you for your project, just found it while I was looking for a quick&easy tool to make bootable USB on Mac πŸ‘

Trying right now! πŸ˜†

@TechUnRestricted
Copy link

@100ferhas Hope it will work for you! :)

@KevinKurtz
Copy link

You can use the application that I created specifically for these purposes. It's completely free and open source.

WinDiskWriter

WinDiskWriter has huge compatibility with older versions of macOS, starting with good old Mac OS X 10.6 Snow Leopard up to the latest one β€” macOS 14.0 Sonoma.
WinDiskWriter Main Window

Supported Microsoft Windows Versions:

  • Windows 11
  • Windows 10
  • Windows 8.1
  • Windows 8
  • Windows 7
  • Windows Vista
    [including Server Editions]

πŸ“€ UEFI & Legacy Boot Support! πŸ“€

πŸ›  Windows 11 TPM & Secure Boot Path Support! πŸ› 

I hope that this software will solve your problems. I decided to make it, because I suffered at one time when I tried to create a bootable flash drive with Windows on macOS.

Thanks, dude. The original post didn't work for me (wasn't bootable), but your solution worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment