How To Mount CD Rom Linux Shell Command

RegisterLogin
How To Mount CD Rom Linux Shell Command
Post Description: How To Mount CD Rom Linux Shell Command
Tags: How, To, Mount, CD, Rom, Linux, Shell, Command
This Post Was Posted On Feb 29, 2008 By web hosting #2081
Today I will show you how to mount the CD Rom from the shell:


     Code:
mount /dev/cdrom


Thats all! to see the files in your cdrom disk, just executed the following command:


     Code:
cd /media/cdrom


For Red Hat Enterprise Edition Version 3 use this:

     Code:
cd /mnt/cdrom



once you are in the cdrom directory, typ ls to list all the files in your cd

very easy huh!

note: I was using Redhat/Fedora for this example.
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
hostman
#2167 1
i tried your method and i kept getting an error. I send the command you say here, but when i send the command in the linux shell, i get an error saying that /mnt/cdrom directory of file doesn't exist. I read one of your other posts here where it explains how to mount an external USB hard drive in linux thought the command shell. So i was able to figure out how to properly mount my CDROM Drive in my linux computer.

The first thing i did was logged in as root in my server, then i had to create a directory to which to mount the cdrom to. This part i didn't understand about linux. when am actually mounting a device, am actually putting all the content into whichever direcoty i wish to mount the device to.

For example, lets say i want to mount my cd drom right, so this is what i have to do:

1. opend your cdrom drive and put the cd inside and close the drive, the login as root
2. create a directory to which i am going to mount the device to. in this example, i will use create a directory in /mnt called cdrom, the command to do this, is this one:
     Code:
mkdir /mnt/cdrom

3. once i have created the /mnt/cdrom directory, i am going to mount my cdrom to the /mnt/cdrom directory, but first i want to make sure that the cdrom is listed in my devices so i will send this comand:
     Code:
ls /dev/
when i send this command i get this:
     Code:
[root@ns1 ~]# ls /dev
adsp fd0u360 lp0 ram12 stderr tty25 tty46 ttyS0
agpgart fd0u720 MAKEDEV ram13 stdin tty26 tty47 ttyS1
apm_bios fd0u800 mapper ram14 stdout tty27 tty48 ttyS2
audio fd0u820 md0 ram15 systty tty28 tty49 ttyS3
bus fd0u830 mem ram2 tty tty29 tty5 urandom
console floppy-fd0 mixer ram3 tty0 tty3 tty50 vcs
core full net ram4 tty1 tty30 tty51 vcs1
cdrom gpmctl null ram5 tty10 tty31 tty52 vcs2
disk hda nvram ram6 tty11 tty32 tty53 vcs3
dm-1 hda1 par0 ram7 tty12 tty33 tty54 vcs4
dmfm hda2 parport0 ram8 tty13 tty34 tty55 vcs5
dsp initctl parport1 ram9 tty14 tty35 tty56 vcs6
fd input parport2 ramdisk tty15 tty36 tty57 vcsa
fd0 kmsg parport3 random tty16 tty37 tty58 vcsa1
fd0u1040 log port root tty17 tty38 tty59 vcsa2
fd0u1120 loop0 ppp rtc tty18 tty39 tty6 vcsa3
fd0u1440 loop1 ptmx sda tty19 tty4 tty60 vcsa4
fd0u1680 loop2 pts sda1 tty2 tty40 tty61 vcsa5
fd0u1722 loop3 ram sequencer tty20 tty41 tty62 vcsa6
fd0u1743 loop4 ram0 sequencer2 tty21 tty42 tty63 VolGroup00
fd0u1760 loop5 ram1 sg0 tty22 tty43 tty7 X0R
fd0u1840 loop6 ram10 shm tty23 tty44 tty8 zero
fd0u1920 loop7 ram11 snd tty24 tty45 tty9

As you can see from the list, i have a device called "cdrom" so i want to moun this device to the directory i created earlier called "cdrom" so to do that i send this command:
     Code:
mount -t auto /dev/cdrom /mnt/cdrom


IMPORTANT: don't remove the cd inside the cdom until you have properly unmounted the device, to unmount the cdrom device from our directory we created earlier (/mnt/cdrom) send this command:


     Code:
umount /mnt/cdrom


Done, thats it, - thanks for the guys at www.webune for their support on this.
Jan 16, 2007 Reply Report abuse
©2011 Webune Forums - Sun Dec 18, 2011 4:38 pm
Powered by: Webune Forums V3