Linux hardware devices in the/dev directory, the optical drive is one of them.
/dev/cdrom represents the optical drive, the method of mounting the optical drive is as follows (in root):
Copy Code code as follows:
Mkdir/mnt/cdrom
Mount-t auto-o ro/dev/cdrom/mnt/cdrom #不加参数也能自动挂上.
The following is a screen copy of the action:
Copy Code code as follows:
linux@cdyemail:/$ Ls/mnt #查看mnt下面有没有cdrom目录, this is a random catalogue.
CDROM ISO USB winc wind
linux@cdyemail:/$ Mount/dev/cdrom/mnt/cdrom #挂载发现没有权限
Mount: Only root is allowed for this operation
linux@cdyemail:/$ su #切换到root用户, you can also use sudo to get root permissions.
Password:
root@cdyemail:/# mount-t auto-o ro/dev/cdrom/mnt/cdrom #-t Auto Type automatic,-o ro read-only mode
root@cdyemail:/# ls-l/mnt/cdrom #查看光盘内容
Total dosage 3464
-r--r--r--1 root root 143 2010-09-28 19:27 Autorun.inf
Dr-xr-xr-x 3 root root 2048 2010-09-28 19:28 boot
Dr-xr-xr-x 2 root root 2048 2010-09-28 19:28 Casper
Dr-xr-xr-x 3 root root 2048 2010-09-28 19:28 dists
Dr-xr-xr-x 2 root root 2048 2010-09-28 19:28 Install
Dr-xr-xr-x 2 root root 16384 2010-09-28 19:28 isolinux
-r--r--r--1 root root 4880 2010-09-28 19:28 md5sum.txt
Dr-xr-xr-x 2 root root 2048 2010-09-28 19:28 pics
Dr-xr-xr-x 4 root root 2048 2010-09-28 19:28 Pool
Dr-xr-xr-x 2 root root 2048 2010-09-28 19:28 preseed
-r--r--r--1 root root 237 2010-09-28 19:28 readme.diskdefines
Lr-xr-xr-x 1 root 1 2010-09-28 19:28 ubuntu->.
-r--r--r--2 root root 2037229 2010-06-04 19:27 usb-creator.exe
-r--r--r--1 root root 1472825 2010-09-01 20:04 wubi.exe
root@cdyemail:/# Umount/mnt/cdrom #删除挂载的光驱
root@cdyemail:/# Eject/dev/cdrom #弹出光驱
root@cdyemail:/#
Report:
Mounts can be mounted for ISO image files
Copy Code code as follows:
Mount-t iso9660-o loop ISO file/mnt/iso