# Burn a CD from the command line

**URL:** <https://forums.thehomestack.io/t/burn-a-cd-from-the-command-line/168>\
**Category:** Linux - General\
**Created:** [September 12, 2004, 10:16pm UTC](https://forums.thehomestack.io/t/burn-a-cd-from-the-command-line/168 "2004-09-12T22:16:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://forums.thehomestack.io/uploads/default/original/1X/161426793bc0d8bdf0d1a6692b3e44446861cc72.jpeg) [@system](https://forums.thehomestack.io/u/system)\
**Post date:** [September 12, 2004, 10:16pm UTC](https://forums.thehomestack.io/t/burn-a-cd-from-the-command-line/168/1 "2004-09-12T22:16:17Z")

</div>

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

```auto

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

```

Then

```auto

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:

```auto

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

```

or

```auto

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

```
