Getting rpiboot onto your computer is a short job, but the steps look different on Linux and Windows, and a couple of small details trip up first time users. This guide walks you through both routes so you can pick the one that matches your host machine and get to a working install without guessing. rpiboot comes from Raspberry Pi’s official usbboot repository, so you will always download it from that source, and you will end up with a command line tool you run from a terminal or command prompt. By the end of this guide, you will know how to build it on Linux, install it on Windows, and confirm it runs before you connect any hardware.
Get the source on Linux
On Linux, you build rpiboot from source, and the process has just a few steps. Start by cloning the official repository with a shallow clone, which keeps the download small and fast. The command is git clone –depth=1 https://github.com/raspberrypi/usbboot, and it creates a usbboot directory in your current folder. Move into that directory before you do anything else, since the build files live there. If you have used git before, this step will feel familiar. If you have not, you only need git installed, and your distribution’s package manager can add it in a moment.
Next, install the libusb development files. rpiboot talks to the Pi over USB using the libusb library, and building it needs the development headers, not just the runtime library that may already sit on your system. On Debian based systems, the package is libusb-1.0-0-dev, and you install it with your package manager. This is the step people skip most often, and the build fails without it, usually with an error about a missing header. If your build stops at that point, check this package first before you look for anything more exotic. Once it is installed, you are ready to build.
Build and run it on Linux
Inside the usbboot directory, run make. That single command compiles rpiboot from the source you cloned, and it should finish quickly with no fanfare. You will see compiler output scroll past, and then a fresh rpiboot executable will sit in the same directory. You run it from there with sudo ./rpiboot, and the sudo matters. rpiboot needs raw USB access to talk to the Pi, and a normal user account does not have that permission by default. Running without sudo is one of the most common permission errors, and it shows up as a failure to open or claim the device. Use sudo, and that whole class of error goes away.
It helps to test the build before you wire up hardware. Run the tool with the help flag, sudo ./rpiboot -h, and confirm it prints its usage text instead of an error. That check tells you the build worked and the executable runs. You do not need a Compute Module attached for the help text, so you can settle the install completely before you touch a jumper or cable. If help prints cleanly, your Linux install is done, and you can move on to connecting a module when you are ready.
Install rpiboot on Windows
On Windows, you do not build from source. An installer is provided, and it sets everything up with Start Menu shortcuts for the common jobs. After you run the installer, look for shortcuts named rpiboot-CM-CM2-CM3 for older modules and rpiboot-CM4-CM5 – Mass Storage Gadget for Compute Module 4 and 5. Those shortcuts launch rpiboot with the right defaults for each family, so you do not need to type a directory path for the standard mass storage job. There are also batch files, such as rpi-mass-storage-gadget64.bat, that start the mass storage gadget directly.
You can also run rpiboot from Command Prompt if you prefer the command line. From a prompt, plain rpiboot defaults to mass-storage-gadget64, which is the 64 bit mass storage gadget used for CM4 and CM5 work. If you need a different directory of boot files, pass it with rpiboot -d followed by the directory name, and rpiboot -h shows help just like on Linux. The Windows install therefore gives you two equally valid paths: shortcuts and batch files for quick clicks, and the command prompt for precise control. Pick the one that fits how you like to work, since both reach the same tool underneath.
Using rpiboot inside WSL
Some Windows users run Linux through WSL and want to use the Linux build of rpiboot there. That works, but it needs one extra step, because WSL does not see USB devices by default. You must forward the USB device from Windows into WSL with usbipd. Start with usbipd list on the Windows side to see attached USB devices and their bus IDs. Find the entry for your Compute Module, then run usbipd attach with that bus ID to hand the device to WSL. Only after that attach step will the Linux rpiboot inside WSL see the module.
The order matters here. Attach the device after the module is in USB boot mode and connected, then run rpiboot inside WSL. If you run rpiboot first and attach later, it will sit waiting for a device that is not visible yet. If you detach and reattach, you may need to repeat the attach step. Keep usbipd list handy during your first WSL session so you can confirm the device is actually forwarded before you spend time debugging rpiboot itself. Most WSL problems turn out to be forwarding problems, not rpiboot problems.
Check your install before you flash anything
Before you connect a module for a real flash, run through a short checklist on your host. Confirm the tool runs and shows help, confirm you can run it with the permissions it needs, and confirm you know which imaging tool you will use once the eMMC appears. On Linux, that means sudo works and the build finished cleanly. On Windows, that means the shortcuts exist and a command prompt run shows help. On WSL, that means usbipd can list the device and attach it. Each check is small, but together they remove almost every install related surprise from your first flashing session.
It also pays to have your OS image downloaded and ready before you start. rpiboot itself does not download an OS for you, and the mass storage step goes faster when the image is already on your disk. Check the image file size against the release notes, keep it somewhere easy to find, and decide if you will write it with dd or with Raspberry Pi Imager. With the tool installed, the image ready, and a data carrying USB cable in hand, you are set up for a smooth first run.
One more habit will make your install last. Keep a short note of which route you used, Linux build or Windows installer, and where the tool lives on that machine. When you return to flashing months later, that note removes all guesswork, and you will not waste time rebuilding a tool that already works. Note the date you installed it too, so you know at a glance if a fresh clone is worth doing before an important session.
Conclusion
Installing rpiboot is a short task once you know which route fits your machine. On Linux, clone the official usbboot repository, install libusb-1.0-0-dev, run make, and launch it with sudo. On Windows, run the provided installer and use the Start Menu shortcuts or the command prompt, where plain rpiboot defaults to mass-storage-gadget64. In WSL, add the usbipd forwarding step so the Linux build can actually see the device. Test with the help flag before you connect hardware, keep your OS image ready, and your install will be out of the way before the real work starts. From there, flashing a Compute Module is just a matter of setting the boot jumper and running the tool you have just installed.
Read next:

Pingback: rpiboot on Windows: Install and Use Guide
Pingback: rpiboot on Linux: Build from Source Guide
Pingback: rpiboot Commands and Options Explained