Banner of Easy ISO Creation from Directory in Linux: Complete Tutorial

How to Create an ISO from a Directory in Linux

Category: Linux

Date: 11 days ago
Views: 97

Creating an ISO image from a directory in Linux can be done using the mkisofs or genisoimage command. Follow these steps:

1. Install mkisofs or genisoimage

If you don't have mkisofs or genisoimage installed, you can install it using your package manager. For most Linux distributions, the package is named genisoimage.

For Debian-based distributions (like Ubuntu):

sudo apt-get install genisoimage

For Red Hat-based distributions (like Fedora):

sudo yum install genisoimage

2. Create the ISO

Use the mkisofs or genisoimage command to create the ISO. The basic syntax is:

mkisofs -o output.iso /path/to/directory


genisoimage -o output.iso /path/to/directory


mkisofs -o mydisk.iso /home/user/myfolder


genisoimage -o mydisk.iso /home/user/myfolder

3. Additional Options

You can use various options with mkisofs or genisoimage to customize the ISO creation process. Some common options include:

  • -V "Volume Label": Sets the volume label.

  • -R: Enables Rock Ridge extensions, which are useful for retaining file permissions and longer filenames.

  • -J: Enables Joliet extensions, which allow the ISO to be read by Windows systems.

Example with additional options:

mkisofs -o mydisk.iso -V "MY_DISK" -R -J /home/user/myfolder


genisoimage -o mydisk.iso -V "MY_DISK" -R -J /home/user/myfolder

After running the command, you will have an ISO file named output.iso (or mydisk.iso in the examples) that contains the contents of the specified directory.


Previous Article Next Article

0 Comments, latest

No comments.