Eject command allows removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) to be ejected under software control. The command can also control some multi-disc CD-ROM changers, the auto-eject feature supported by some devices, and close the disc tray of some CD-ROM drives.
Eject using device name (DVD/CD)
eject -t /dev/dvd
Eject first SCSI device:
Select CD slot
The command can also control some multi-disc CD-ROM changers (note that the first slot of the changer is referred to as 0, not 1):
eject -c 1 /dev/cdrom