Forrest logo
back to the diskutil tool

diskutil:tldr:fc138

diskutil: Eject a CD/DVD (unmount first).
$ diskutil eject ${-dev-disk_device1}
try on your machine

The command diskutil eject is used to unmount and safely eject a disk from the system. In this specific command, ${-dev-disk_device1} is a placeholder for the device identifier of the disk you want to eject. The device identifier can vary depending on the system and connected disks. To use this command, you would need to replace ${-dev-disk_device1} with the actual device identifier of the disk you want to eject. For example, if the device identifier of the disk is disk1, the command would be: diskutil eject disk1 This command will unmount the disk (if it is mounted) and then safely eject it from the system, ensuring that any ongoing operations on the disk are completed before ejection.

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 diskutil tool