Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-02-2004, 11:56 AM   #1
LQ Newbie
Registered: May 2004
Posts: 9

Rep: Reputation: 0
bash command for cdrom eject?

i know there is usually a bash command to do this
im in gentoo 2004.1
i was just wondering if theres a command for this because im trying to write a script.
Old 06-02-2004, 12:01 PM   #2
Registered: Feb 2004
Location: Florida
Distribution: FreeBSD, CentOS, Debian, Mint
Posts: 111

Rep: Reputation: 17
believe it or not its eject.
Old 06-02-2004, 02:29 PM   #3
LQ Newbie
Registered: May 2004
Posts: 9

Original Poster
Rep: Reputation: 0
yea i tried that. for some reason it doesnt seem to be working.

go figure...
Old 06-02-2004, 03:05 PM   #4
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Make sure the CD is not mounted. If it is, then neither the eject command or the eject button will work until you unmount the CD.
Old 06-02-2004, 03:09 PM   #5
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
By default it will try to eject the symlink:

If you need to eject another drive use, for example:
eject /dev/hdd
Old 06-02-2004, 04:00 PM   #6
LQ Newbie
Registered: May 2004
Location: Czech Republic
Distribution: Arch Linux
Posts: 17

Rep: Reputation: 0
'eject /dev/cdrom' should eject your cdrom. when mounted, it will try to umount first. for rejecting back, use '-t', i.e. 'eject -t /dev/cdrom'


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CDRom Won't eject! SentralOrigin Linux - Hardware 8 03-30-2006 11:35 PM
CDROM won't eject.. pookguy88 Linux - Newbie 2 01-18-2005 10:50 PM
Can't Eject my CDROM!!! Setheck Linux - Hardware 5 09-02-2004 01:05 PM
Can't eject cdrom aeruzcar Linux - Hardware 5 08-16-2003 08:25 PM
cdrom eject FNC Linux - General 2 05-31-2001 09:47 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration