Forrest logo
back to the wodim tool

wodim:tldr:d7a13

wodim: Burn a file to a disc, ejecting the disc once done (some recorders require this).
$ wodim -eject dev=/dev/${optical_drive} -data ${file-iso}
try on your machine

The command "wodim -eject dev=/dev/${optical_drive} -data ${file-iso}" is used to eject or open the optical drive tray and burn an ISO file to a disc using the wodim utility.

Let's break down the command:

  • "wodim" is a command-line tool for writing data to optical discs (primarily CDs and DVDs) in Unix-like systems.
  • "-eject" is an option that instructs wodim to open or eject the optical drive tray.
  • "dev=/dev/${optical_drive}" specifies the device file of the optical drive to be used. The placeholder "${optical_drive}" should be replaced with the appropriate device name (e.g., "sr0" or "cdrom"). Usually, the "/dev" directory contains device files for connected hardware components, and you need to provide the correct optical drive device file here.
  • "-data" is an option that tells wodim to burn the ISO file as data. In this case, the ISO file will be treated as raw data and burned to the disc without any specific file system.
  • "${file-iso}" represents the path or name of the ISO file that you want to burn. The placeholder "${file-iso}" should be replaced with the actual path or name of the ISO file you want to burn to the disc.

By executing this command, wodim will eject the tray of the specified optical drive, allowing you to insert a blank disc. Afterward, it will burn the ISO file as raw data to the disc inserted in the optical drive.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the wodim tool