ejecting reluctant CDs in Linux

computing: software: Linux: ejecting reluctant CDs in Linux

Overview
Linux tends to lock CD and DVD drives, which prevents the drive from ejecting their media even if you press the drive's "eject" button.

Some useful commands for this situation – execute these as root or using, where /dev/name is the name of the device name (this can be found using KDiskFree, but there are probably better ways):

-f /dev/name
 * This command forces the device to umount, even if busy (but it may not work even so):

/dev/name
 * (might be in /usr/sbin) lists processes which have files open on the device, so you can them:

-9 pid
 * This command kills processes that don't want to die (where pid is the process ID number):

/dev/name
 * And finally, if the drive seems completely unmounted but the door still won't open, try:

More Tips
If the door won't open but says it can't open the device, try attempting to  the drive, then try manually ejecting again.