How to Eject a CD from a Mac computer through a terminal
In this tutorial, we learn how to eject a CD from a Mac computer through a terminal. Now, go to the finder and click on the applications folder. Scroll down to the bottom and open up utilities, then the terminal. Once you are inside this new screen, type in "drutil tray eject". Now, when you press return the icons will disappear and your disc will pop out of your computer. This will work most of the time and help your computer eject the CD without you having to restart your computer and losing everything you are working on. Use this whenever your CD gets stuck and you will be good to go!