Last Updated on 6 days by Sachin G
In this guide, I’ll show you how to create a bootable USB using the dd command in Linux. i’ll cover everything step by step, with examples and pro tips to avoid common mistakes.
Creating a bootable USB is one of those essential skills every Linux user eventually needs. Whether you’re installing a fresh Linux distribution, testing out new operating systems, or preparing recovery tools, having a reliable bootable USB drive is a lifesaver. Over the years, I’ve tried several tools like Rufus, Etcher, and Unetbootin, but I keep coming back to the simplicity and power of the dd
command in Linux.
Unlike GUI-based tools, dd
is fast, reliable, and works in any Linux terminal without extra installation. It may look intimidating at first glance, but trust me—once you understand it, you’ll never go back.
Why Use dd
to Create a Bootable USB?
Before diving into commands, let’s understand why dd
is such a popular choice among Linux professionals.
- Pre-installed on Linux: Most Linux distributions come with
dd
already installed. No extra downloads. - Lightweight & Fast: Unlike GUI tools,
dd
works directly in the terminal without overhead. - Works Everywhere: It’s universal for all Linux flavors—Ubuntu, Debian, Fedora, Arch, you name it.
- Low-level Copying: It writes the ISO image bit by bit, ensuring a perfect replica.
Note:
dd
is powerful but dangerous if misused. A wrong device name can wipe your entire disk. I’ll share safety tips later.
Prerequisites Before Using dd
Before we start, make sure you have the following:
- A Linux machine (Ubuntu, Fedora, Debian, or any distro).
- A USB drive (at least 4GB for most Linux ISOs).
- The ISO image of the OS you want to install (e.g., Ubuntu 24.04 LTS).
- Sudo privileges (required for writing to USB).
Step 1: Download the ISO File
First, you need to download an ISO file of the Operating System. ISO File you can get from the official website of the OS provider. It can be Ubuntu, CentOS, AlmaLinux, Rocky Linux, or Oracle Linux. Some of the Linux-based distros’ official operating system page URL is below.
After downloading the iso image file, you should keep the path of the downloaded ISO image file and also format the USB drive.
Step 2: Identify Your USB Device
This step is crucial to avoid data loss. When you attach the USB drive then it can be mounted automatically. First, check and review information about the USB device through the commands below.
lsblk
This lists all block devices. Plug in your USB drive and run lsblk
again. The new device that appears is your USB drive.
Example output:
lsblk
Here, sdb
is the USB device (without the number). Never confuse this with your main disk (usually sda
)!.
Step 3: Unmount the USB Drive
If the USB is mounted, unmount it before writing the ISO. If the device is mounted under the “ MOUNTPOINTS or Mounted on “, then you unmount it through the umount command.
Replace sdb
with your actual device name.
Step 4: Create a Bootable USB Using dd Command
First, find a USB and keep storing data backup, which is in a USB stick and insert it into your system. Creating an image on a USB flash drive with the dd command is a very simple step. First, find the device path associated with the USB drive. Assuming it’s /dev/sdb. Be careful if sdb is a block store with data, these commands will overwrite all data on that device.
sudo dd if=~/Downloads/ubuntu.iso of=/dev/sdb bs=4M status=progress
Explanation:
if=
→ Input file (ISO image)of=
→ Output device (USB)bs=4M
→ Block size (speeds up copying)status=progress
→ Shows progress bar
In the above command, you can also use the progress option to get status . status=progress. After the process gets complete, now your USB stick is ready for boot.
dd
commandNow you can use a USB drive for installation.
Pro Tips for Safe Usage
- Triple-check the device name (
/dev/sdb
). Wrong disk = total data loss. - Use
sync
after the command finishes to ensure all data is written:
Step 5: Verify the Bootable USB
After completion, eject the USB:
sudo eject /dev/sdb
You can now plug it into any machine and boot from it.
Common Errors and Fixes
❌ “Permission denied”
Solution: Use sudo
before the command.
❌ USB not booting
- Ensure you wrote the ISO to the device (
/dev/sdb
), not a partition (/dev/sdb1
). - Check if the ISO is a hybrid image (most Linux ISOs are).
Alternative: Monitor Write Speed
Want to see write speed? Use:
sudo dd if=~/Downloads/ubuntu.iso of=/dev/sdb bs=4M status=progress conv=fsync
Why dd Over GUI Tools?
I’ve used tools like Etcher and UNetbootin, but dd
always wins when:
- Working on remote servers over SSH
- Minimal systems without GUI
- Faster write with fewer errors
Best Practices
- Always backup USB data before writing.
- Download ISO from official sources only.
- Run
sha256sum
to verify ISO integrity:
sha256sum ~/Downloads/ubuntu.iso
Learn Smarter. Level Up Faster →
Want to master Linux, DevOps, Ansible, or Cloud workflows the smart way? I’ve curated a list of top-rated, real-world Udemy courses — based on student reviews and practical feedback.
Visit the Recommended Courses page to explore and enroll in courses trusted by the community.
See Curated Courses →FAQs
dd
comes pre-installed on Linux and macOS. For Windows, you can use tools like Rufus.
Boot from it in BIOS/UEFI. If the ISO is valid and dd finished successfully, it should work.
Yes, for command-line users, it’s one of the fastest and most reliable methods.
Unfortunately, dd
overwrites immediately. Always verify the device before proceeding.
Creating a bootable USB using the dd
Command in Linux might look daunting at first, but it’s one of the most reliable and universal methods out there. With just a single command, you can transform any USB drive into a powerful installation media for Linux distributions.
I’m Sachin Gupta — a freelance IT support specialist and founder of techtransit.org. I’m certified in Linux, Ansible, OpenShift (Red Hat), cPanel, and ITIL, with over 15 years of hands-on experience. I create beginner-friendly Linux tutorials, help with Ansible automation, and offer IT support on platforms like Upwork, Freelancer, and PeoplePerHour. Follow Tech Transit for practical tips, hosting guides, and real-world Linux expertise!