Burn a CD from the command line

To make a CD image of a directory with Rock Ridge and Joliet file support:


mkisofs -o name_of_file.iso -J -r /home/username/name_of_directory 

Then


cdrecord -v speed=8 dev=0,0,0 name_of_iso_file.iso 

(Note that you need to get the info for the ‘dev=’ part by running ‘cdrecord -scanbus’)

To copy a CD to an image file you could use this:


dd if=/dev/scd0 of=/home/username/isoimage.iso 

or


cat /dev/scd0 >> /home/username/isoimage.iso