I recently found a question on superuser regarding ejecting a CD using the Windows command line.
How can I do this using Linux terminal?
I recently found a question on superuser regarding ejecting a CD using the Windows command line.
How can I do this using Linux terminal?
The eject
command does what you want. Without any arguments provided, it ejects the default (first) 'cdrom' device. If you want to eject a specific device, provide it as an argument.
eject /dev/cdrom1
Quoting from the eject manpage (man eject
):
Eject 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.
The device corresponding to is ejected. The name can be a device file or mount point, either a full path or with the leading "/dev", "/media" or "/mnt" omitted. If no name is specified, the default name "cdrom" is used.
eject
? – muru Sep 14 '15 at 17:13eject -t
... – Gophyr Sep 14 '15 at 17:17