Creating an ISO file in Linux sounds like something that should require a black hoodie, three monitors, and a keyboard with suspiciously loud switches. Good news: it does not. Whether you want to back up a CD or DVD, package a folder into a mountable image, create installation media, or simply preserve files in a clean, portable format, Linux gives you several reliable ways to do it.
An ISO file is a disk image that usually follows the ISO 9660 file system standard, originally designed for optical media such as CDs and DVDs. Today, ISO files are used for Linux distributions, software installers, backups, virtual machines, bootable USB drives, and long-term archives. In plain English, an ISO is like a perfectly sealed digital box: the files inside stay organized, portable, and easy to mount or burn later.
This guide explains four easy methods to create an ISO file in Linux: using genisoimage or mkisofs, using xorriso, using dd, and using graphical tools. You will also learn how to verify, mount, test, and avoid the classic “oops, I imaged the wrong drive” disaster. Linux is powerful, but it does not always ask twice before doing exactly what you told it to do.
Before You Start: What Kind of ISO Do You Need?
Before running commands, pause for one tiny but important question: are you creating an ISO from a folder, or are you copying an existing disc or device into an image?
If you want to turn a folder full of files into an ISO, use tools such as genisoimage, mkisofs, or xorriso. These tools build a proper ISO 9660 file system from your directory tree. This is ideal for software packages, document archives, photo backups, or files you want to mount later as a read-only image.
If you want to copy a CD, DVD, or an existing block device exactly, use dd. The dd command copies raw data from one place to another. It is excellent for cloning optical discs, but it does not magically turn a normal folder into an ISO file. Asking dd to make an ISO from a folder is like asking a photocopier to cook pasta. Impressive machine, wrong job.
Method 1: Create an ISO File from a Folder with genisoimage or mkisofs
The most common way to create an ISO file in Linux is to use genisoimage or mkisofs. These command-line tools create ISO 9660 images from directories. They are popular because they are fast, script-friendly, and available in many Linux distributions.
Install genisoimage
On Debian, Ubuntu, Linux Mint, and related systems, install it with:
On Fedora, CentOS Stream, Rocky Linux, or AlmaLinux, the package name may vary depending on the repository, but you can usually install compatible ISO tools with:
On Arch Linux or Manjaro, use:
Create a basic ISO from a directory
Suppose your files are stored in a folder named my-files. To create an ISO named backup.iso, run:
This command tells Linux to take the contents of my-files and package them into backup.iso. Simple, effective, and much less dramatic than it sounds.
Create an ISO with Rock Ridge and Joliet support
For better compatibility, especially if your files have long names, lowercase letters, symbolic links, or Unix permissions, add Rock Ridge and Joliet extensions:
The -R option enables Rock Ridge, which helps preserve Unix-style file information. The -J option enables Joliet, which improves compatibility with Windows systems. Together, they make the ISO more useful across different operating systems.
Add a volume label
A volume label gives your ISO a friendly name when mounted:
Keep labels short and simple. Avoid spaces if you want maximum compatibility, although modern systems are usually forgiving.
When to use this method
Use genisoimage or mkisofs when you want to create an ISO from a folder, build a portable archive, preserve files in a read-only format, or automate ISO creation in shell scripts. This is the “daily driver” method for most Linux users.
Method 2: Create an ISO File with xorriso
xorriso is a powerful tool for creating, inspecting, modifying, and writing ISO 9660 file systems. It is especially useful when working with modern Linux installation media, bootable ISO images, and advanced ISO workflows. If genisoimage is a dependable pickup truck, xorriso is the same truck with a winch, GPS, and a suspicious number of buttons.
Install xorriso
On Debian, Ubuntu, and Linux Mint:
On Fedora and similar distributions:
On Arch Linux:
Create a simple ISO with xorriso
To create an ISO from a folder, use:
The -as mkisofs option tells xorriso to behave like mkisofs, which makes the command easier to understand if you already know older ISO tools. The -R and -J options again provide Rock Ridge and Joliet support.
Create an ISO with a clean root structure
If you want the contents of my-files to appear at the root of the ISO instead of inside an extra folder, run the command from inside the directory:
The final dot means “use the current directory.” The output ISO is placed one level above the folder, which avoids putting the ISO inside itself. Yes, that mistake can happen. No, your computer will not enjoy it.
When to use this method
Use xorriso when you need a modern ISO creation tool, want strong compatibility with mkisofs-style commands, or plan to work with bootable Linux installation images. It is also a good choice for advanced users who want one tool that can create, inspect, and manipulate ISO images.
Method 3: Create an ISO from a CD, DVD, or Device with dd
The dd command is one of the oldest and most powerful tools in Linux. It copies data from an input file to an output file, and in Linux, devices are often treated like files. That means you can use dd to copy an optical disc into an ISO image.
However, dd deserves respect. It does not care about your feelings, your weekend plans, or the folder named “important-tax-stuff-final-final-v3.” If you reverse the input and output, you can overwrite data. Always double-check device names before pressing Enter.
Find your optical drive
Insert the CD or DVD, then identify the device:
Optical drives are commonly listed as /dev/sr0. You can also check:
Create an ISO from a disc
To copy a CD or DVD into an ISO file, run:
Here is what the options mean:
if=/dev/sr0means the input file is the optical drive.of=disc-backup.isomeans the output file is the ISO image.bs=4Msets the block size to 4 megabytes for efficient copying.status=progressshows progress while the copy runs.
Create an image from a USB drive or partition
You can also use dd to image a USB drive or partition:
Notice the output file uses .img instead of .iso. That is intentional. A raw image of a USB drive is not necessarily an ISO 9660 image. It may contain partition tables, boot sectors, multiple file systems, and other data. Naming it .iso does not make it an ISO; it only gives it a tiny identity crisis.
When to use this method
Use dd when you want a bit-for-bit copy of an existing CD, DVD, or device. Do not use it to create a new ISO from a normal directory. For folders, use genisoimage or xorriso.
Method 4: Create an ISO File Using Graphical Linux Tools
Not everyone wants to live in the terminal. Some days you want buttons, menus, and a friendly progress bar that does not look like it escaped from 1973. Linux has several graphical tools that can create or manage ISO images.
Option A: Use Brasero
Brasero is a simple disc-burning application often used on GNOME-based desktops. It can create data projects and save them as image files.
Install it on Ubuntu or Debian-based systems with:
To create an ISO with Brasero:
- Open Brasero.
- Choose Data Project.
- Add the files and folders you want.
- Click Burn.
- Select Image File instead of a physical disc.
- Save the output as an ISO file.
Option B: Use K3b
K3b is a full-featured disc authoring tool often used on KDE Plasma desktops. It is excellent for users who want more control while still using a graphical interface.
Install it on Debian or Ubuntu-based systems with:
To create an ISO in K3b, start a new data project, add your files, choose the option to create an image, and save the ISO to your preferred location.
Option C: Use GNOME Disks for device images
GNOME Disks is useful for creating images of drives and partitions. It is not the same as building an ISO from a folder, but it is handy when you want to back up a USB drive or disk-like device.
Open GNOME Disks, select the device, click the menu, and choose an image creation option. Depending on the source, the resulting file may be a raw disk image rather than a true ISO file. For optical media, an ISO-style image may be appropriate; for USB drives and hard disks, .img is usually the more accurate extension.
When to use this method
Use graphical tools when you prefer a visual workflow, are creating a simple data ISO, or want to avoid memorizing commands. Command-line tools are better for automation, servers, and advanced bootable ISO work, but GUI tools are perfectly fine for everyday use.
How to Mount and Test Your ISO File
After creating an ISO, test it before trusting it. An untested backup is just a hopeful rumor wearing a file extension.
Create a mount point
Mount the ISO
The -o loop option lets Linux treat the ISO file like a block device. Once mounted, you can browse it like a normal read-only folder:
Unmount the ISO
When finished, unmount it:
Check the ISO file size
If your ISO is suspiciously tiny, you may have pointed the command at the wrong folder. If it is enormous, you may have accidentally included more than intended. Linux will not judge you, but your storage drive might sigh audibly.
How to Verify an ISO with Checksums
Checksums help confirm that an ISO file has not changed, corrupted, or suffered a mysterious digital sneeze. The most common modern option is SHA-256.
Create a SHA-256 checksum
Verify the checksum later
If the result says OK, the file matches the original checksum. If it fails, do not ignore it. A failed checksum means the file changed, the checksum file is wrong, or something went sideways during transfer or storage.
Common Problems When Creating ISO Files in Linux
Problem 1: “Command not found”
If Linux says genisoimage: command not found or xorriso: command not found, install the missing package using your distribution’s package manager. On Ubuntu, that usually means apt. On Fedora, use dnf. On Arch, use pacman.
Problem 2: Permission denied
If you are reading from a device such as /dev/sr0 or /dev/sdb, you may need sudo. For folder-based ISO creation, you usually do not need root unless the files themselves require elevated permissions.
Problem 3: File names look strange on Windows
Create the ISO with Joliet support by adding -J. For Linux-friendly metadata, add -R. A good general-purpose command is:
Problem 4: The ISO contains the wrong folder structure
If your ISO opens and shows an extra folder layer, you probably created the ISO from the parent directory. To place the folder contents at the ISO root, run the command from inside the source folder and use . as the source.
Problem 5: Bootable ISO does not boot
Creating a bootable Linux ISO is more complex than creating a data ISO. Bootable images may need El Torito boot records, BIOS and UEFI files, boot catalogs, hybrid partition data, and distribution-specific settings. For custom bootable Linux media, xorriso is usually the better tool, but you must preserve the original boot structure carefully.
Best Practices for Creating ISO Files in Linux
First, organize your source folder before building the ISO. Remove temporary files, duplicate downloads, cache folders, and anything named “new-new-final-real-final.” An ISO is usually read-only after creation, so clean first and package second.
Second, use clear names. A file named backup.iso is fine today, but three months from now it may be about as helpful as a mystery jar in the fridge. Use names like project-documents-2026-07.iso or family-photos-archive-2026.iso.
Third, store checksums next to important ISO files. If the ISO is going to be uploaded, copied to an external drive, or archived for years, a SHA-256 checksum gives you a reliable way to confirm integrity later.
Fourth, test the ISO by mounting it. Do not assume it worked just because the command finished without fireworks. Mount the image, browse the files, and confirm that the structure looks right.
Finally, choose the right tool for the job. Use genisoimage for simple folder-to-ISO tasks, xorriso for modern and advanced ISO workflows, dd for raw disc or device copies, and graphical tools when you want a friendly interface.
Practical Examples
Create an ISO archive of documents
This creates a portable ISO archive of your Documents folder with Linux and Windows-friendly filename support.
Create an ISO from a project folder
This is useful when you want to deliver a project in a clean, mountable package.
Back up a DVD
This copies the DVD into an ISO image. Make sure you have the right to copy the disc, especially if it contains copyrighted material.
Mount and inspect the ISO
This confirms that your ISO can be mounted and read correctly.
Which Linux ISO Method Should You Choose?
If you are new to Linux and just want to create an ISO from a folder, start with genisoimage. It is simple, direct, and does exactly what most people need.
If you are customizing installation media, working with bootable ISOs, or want a more modern tool, choose xorriso. It has more advanced features and remains widely useful for serious ISO work.
If you are copying an existing CD or DVD, choose dd. It creates a raw copy of the disc. Just remember that dd is powerful and unforgiving, so always confirm your input and output paths.
If you prefer not to use the terminal, choose Brasero, K3b, or another graphical tool. GUI tools are great for simple data ISO projects and reduce the chance of command-line typos.
Personal Experience: Lessons Learned from Creating ISO Files in Linux
The first time many Linux users create an ISO file, they expect it to be a single magical command. Sometimes it is. Sometimes it is a tiny educational journey involving permissions, mount points, missing packages, and the sudden realization that /dev/sdb is not always the same device it was yesterday. Linux keeps life exciting.
One practical lesson is to never rush device-based imaging. When using dd, always run lsblk first, then unplug and replug the device if needed, and run lsblk again. This makes it easier to see which device appeared. If a USB drive shows up as /dev/sdb today, it might show up as /dev/sdc tomorrow, especially if another storage device is connected. The command will not stop and ask, “Are you emotionally prepared for this?” It will simply proceed.
Another lesson is that folder-to-ISO creation is cleaner when the source folder is staged first. Instead of creating an ISO directly from a messy working directory, create a dedicated folder such as iso-staging. Copy only the files you want into it, check the structure, then build the ISO from that folder. This prevents accidental inclusion of hidden files, temporary downloads, build artifacts, editor backups, and that one random screenshot you definitely did not mean to distribute.
It is also worth learning the difference between an ISO image and a raw disk image. Many users name every image file .iso because the extension feels familiar. But a raw USB image made with dd may contain a partition table and file systems that are not ISO 9660. In that case, .img is more accurate. File extensions do not change the underlying format; they only change what humans expect. Computers are annoyingly literal about this.
For long-term backups, checksums are a quiet lifesaver. You may not care about SHA-256 on the day you create the ISO, but you will care when you retrieve the file from an external drive two years later and wonder whether it copied correctly. A checksum is like a tamper-evident seal for your data. It takes only a few seconds to create and can save hours of uncertainty later.
Testing is another habit that separates successful ISO creation from “I hope this works.” Mount the ISO immediately after creating it. Browse the files. Open a few documents. Confirm the folder structure. If it is supposed to be bootable, test it in a virtual machine before writing it to USB or sending it to someone else. A bootable ISO that has not been tested is not a bootable ISO; it is a confidence exercise.
In real-world use, the best method depends on the goal. For archiving project files, genisoimage is quick and dependable. For more technical ISO work, xorriso is worth learning because it handles advanced cases better. For copying optical discs, dd remains simple and effective. For casual desktop use, Brasero and K3b are comfortable options. The Linux ecosystem gives you choices, which is wonderful, although occasionally it feels like being handed six different bottle openers and one of them is also a chainsaw.
The most important experience-based advice is this: slow down before writing images, speed up after you understand the workflow. ISO creation is not difficult, but the details matter. Use the right tool, name files clearly, verify the result, and document the command you used. Your future self will thank you, probably while drinking coffee and wondering why past-you was finally so organized.
Conclusion
Creating an ISO file in Linux is easy once you understand which tool fits your situation. For a folder full of files, use genisoimage, mkisofs, or xorriso. For copying an existing CD, DVD, or device, use dd. For a friendlier desktop workflow, use tools like Brasero, K3b, or GNOME Disks depending on whether you are building a data ISO or imaging a device.
The best workflow is simple: prepare your files, create the ISO, mount it, inspect it, and generate a checksum if the file matters. That small amount of care turns an ISO from “probably fine” into “ready to archive, share, boot, or restore.” Linux gives you the tools; your job is to point them in the right direction and not accidentally image your toaster. Unless your toaster runs Linux, in which case, congratulations and possibly seek help.
Note
This article is based on practical Linux behavior and established documentation for common ISO-related tools including genisoimage, mkisofs-compatible workflows, xorriso, dd, mount, loop devices, checksums, and graphical disk utilities. Commands may vary slightly by distribution, package repository, desktop environment, and Linux version.
