Eject or Unmount a disk through the Terminal

Having problem unmounting your disk. Here is an alternative to restarting your computer to eject your unresponding disk.

Having problem unmounting your disk? Try using your Terminal application before restarting.

  1. Open the Terminal application.
  2. Then type ‘df’. This will display a list of all mounted disk items.
  3. Find the disk you want to eject.
  4. The disk I was looking to unmount displayed like this:
    “/dev/disk1s1s2 208484 208484 0 100% /Volumes/Alex Model Pix”.
  5. Above you see first a Unix name “/dev/disk1s1s2” followed by the CD volume name “/Volumes/Alex Model Pix”.
  6. Now type “hdiutil eject FullUnixName” to eject it.
  7. Example: “hdiutil eject /dev/disk1s1s2”.

That’s it. If this does not work. Just restart or poke a pin inside the hidden eject hole by the disk tray if there is one.

Tagged : / / / / / / / / / / /

7 thoughts on “Eject or Unmount a disk through the Terminal

  1. My problem was not that the CD was busy, but that it was no longer recognized. No CD icon on my desktop, no CD icon in the Finder, the Eject command under “file” was inaccessible. A simple terminal command to eject a CD that doesn’t require as many steps, if this fails, try the above post:

    drutil tray eject

  2. Hey! Great instructions, only I am having a problem with Terminal. I type what you say, and it does…nothing. It’s like a word document, you type and nothing happens, you just keep typing. Is this a problem?

  3. PLEASE! HELP! my disk has been stuck in my macbook for almost a year! i’ve tried EVERYTHING! i’ve tried at least 15 different solutions to stuck disks but none of them work. please, i really need to get this disk out my computer.

Leave a Reply

Your email address will not be published. Required fields are marked *