Create an ISO Image File in Linux
Before getting started, we suggest you Learn Linux Basics and follow these precautions.
Have you ever wanted to create an identical copy of an original CD, DVD, or Blu-ray disc? By using the following commands, contents of an optical disc or local directory can be perfectly represented in a single ISO file.
Create an ISO image from optical media
In this example, we're going to copy the contents of a disk in the CD/DVD drive (/dev/cdrom) to an ISO image file. Open a terminal window and type the following at the command line.
dd if=/dev/cdrom of=/directory/example.iso
Notations
- dd is the program used to convert and copy a file.
- if defines an input file.
- of defines an output file.
- iso is the resulting ISO image file.
Create an ISO image from files in a directory
To create an ISO image from files within a directory is just as simple. State an output directory and name of the ISO to create, along with a source directory. For example:
mkisofs -o /home/linuxlookup/example.iso /source/directory/