MacOS - Eject CD-Rom using a command line

It may happens that the CD-ROM tray of your Macbook is blocked and that you're unable to unlock it (using the Eject button). Here's a simple command that may help out out.
  • Open a terminal
  • sudo drutil eject  
  • Press the Enter key
  • Give your password when it is requested.
Published by aakai1056. Latest update on April 30, 2012 at 09:24 AM by aakai1056.
This document, titled "MacOS - Eject CD-Rom using a command line," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (
Unable to use WD elements 320 GB on Macbook
MacOS - No sound on web browsers