In the Linux system, in addition to the local hard drive, you will often use the CD and U disk and other external storage devices, the use of CD-ROM or u disk requires root permissions to complete
1. How to use the disc
(1). device files for optical discs: The Linux system uses the device file "/dev/cdrom" to represent the optical drive in the system, and the user only needs to use the device file to use the optical drive
(2). Mount of disc: Mount for mount Command, mount the file system in the physical device to a directory in the Linux file system, display the mounted information without using parameters, the common format is mount-t type dev dir (-t type indicates the type of file system that needs to be mounted, " iso9660 ", dev" indicates the device name of the mounted file system, "/dev/cdrom", "dir" represents the mount point, which directory the disc will be mounted on.
(3). Read the contents of the CD: There is no difference from accessing other directories, #ls-l
(4). Uninstall of the disc: The Umount command is used for a file system that has been mounted, you can specify the mount device file name or directory name as an argument (#umount/dev/cdrom or #umount/media/cdrom/), and exit the disc mount point directory before uninstalling
(5). CD-ROM drive tray eject and retract: pop-up command #eject, retract command #eject-t, not suitable for notebooks
(6). Make a CD-ROM image file: #cp/dev/cdrom File.iso (similar to copy the contents of the disc to a File.iso folder, the File.iso we just made is a mirrored file)
(7). Mount and uninstall of a CD-ROM image file: Mount for Mount, command for #mount-o loop-t iso9660 file.iso/media/cdrom/("-O loop" indicates mirrored file, "-t 9660" Refers to the mirror file's file system type), uninstall the same as the CD-ROM #umount/dev/cdrom or #umount/media/cdrom
2.U Disk Use method
(1). U disk identification: In the Linux system, USB devices are considered SCSI devices, using #fdisk-l, list all the storage devices in the system, while determining the current U disk device name, insert a U disk, because we are now the hard drive itself is a SCSI device, so the U disk is identified as a SDB, Its partitions are assigned to SDB1.
(2). Mount and use of U disk: For the FAT file system, #mount-T vfat/dev/sdb1/mnt/(mount the second SCSI device to the MNT directory on the FAT file system) for the NTFS file system, #mount-T ntfs/dev/sda1/mnt /(Mount the first SCSI device to the MNT directory on the NTFS file system) and mount the partition instead of the entire device
(3). U disk Uninstall: The same as other file systems in the system uninstall, #umount/dev/sda1