Posts Tagged ‘drive’

Command Line Ejections

Tuesday, March 11th, 2008

Nice. I just figured out how to eject my CD/DVD drive on my Linux desktop (Xubuntu) via command line!

First, display your fstab file to see what the drive is named: ’sudo cat /etc/fstab’

Then look for your disc drive. Mine was called ‘cdrom0′.

Once you’ve found it, type ‘eject [name of drive]‘ and watch the magic.

I mapped that command to my keyboard. Gnome, Xfce and KDE all have a an interface to help you map keyboard shortcuts in their system preferences, or you can just edit the config files manually with a little googling. I mapped ‘ALT-Shift-F12′ to run ‘eject cdrom0′. Easy.