{"id":161,"date":"2010-03-20T18:30:59","date_gmt":"2010-03-20T23:30:59","guid":{"rendered":"http:\/\/www.compdigitec.com\/labs\/?p=161"},"modified":"2010-03-20T18:30:59","modified_gmt":"2010-03-20T23:30:59","slug":"how-to-force-a-cddvd-drive-to-eject-in-linux","status":"publish","type":"post","link":"http:\/\/www.compdigitec.com\/labs\/2010\/03\/20\/how-to-force-a-cddvd-drive-to-eject-in-linux\/","title":{"rendered":"How to force a CD\/DVD drive to eject in Linux"},"content":{"rendered":"<p>Usually, the CD drive in Linux is pretty permissive just like in Windows, where one can eject and insert discs at any time. However, sometimes some random bugs in various application show up when you eject a disk while reading, and the operating system no longer honours any requests to eject (e.g. pressing the eject button the physical drive) because the <a href=\"http:\/\/www.linuxquestions.org\/questions\/slackware-14\/cant-eject-a-cd-318764\/\">application is still waiting for the request to complete<\/a>.<\/p>\n<p>Normally, pressing the eject icon next to the drive in Nautilus would work and usually this command too:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">eject<\/pre>\n<p>However, even that sometimes doesn&#8217;t work properly. Therefore, we need to use cdrecord to forcibly eject:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cdrecord -eject<\/pre>\n<p>This usually will cause the CD tray to eject. However it is recommended that you eject normally by using the eject command as forced ejects could create problems with programs.<\/p>\n<p>If you found this article helpful or interesting, please help Compdigitec spread the word. Don\u2019t forget to <a title=\"Subscribe to Compdigitec Labs\" href=\"\/labs\/feed\/\">subscribe to Compdigitec Labs<\/a> for more interesting articles!<\/p>","protected":false},"excerpt":{"rendered":"<p>Usually, the CD drive in Linux is pretty permissive just like in Windows, where one can eject and insert discs at any time. However, sometimes some random bugs in various application show up when you eject a disk while reading, and the operating system no longer honours any requests to eject (e.g. pressing the eject [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[660,664,663,482,862,662,28,661],"_links":{"self":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts\/161"}],"collection":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/comments?post=161"}],"version-history":[{"count":0,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts\/161\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/media?parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/categories?post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/tags?post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}