How to automatically mount the optical drive in Linux text mode

Source: Internet
Author: User

Mount is used to mount the file system. It can be mounted at startup or after startup. You can use the mount command to mount a device after startup. To enable automatic mounting of a device at startup, you must enable the autofs service to provide this function. This function is like the automatic opening function of the optical drive in windows, which allows you to mount a file system that is dynamically loaded in a timely manner. This frees us from the trouble of manual hanging. Configuration is required for dynamic and automatic mounting of optical drives and floppy disks. The configuration method is as follows:

1. Modify/etc/auto. Master and set the mount point.

Format: mount the cluster point configuration file

Specific settings:/Mnt/etc/auto. Misc

Note: mount the configuration items in/etc/auto. Misc to/MNT.

2. Configuration File Settings

Format:

Mount parameter file system location relative to mount point

Specific settings:

CDROM-fstype = iso9660, iocharset = cp936, RO:/dev/CDROM

Note: The result of the above settings is to mount the/dev/CDROM device to/mnt/CDROM.

3. Start the autofs service

After completing the preceding settings, you must configure the autofs service.

# Chkconfig autofs on

# Service autofs start

Alternatively, we can use the ntsysv command to select the autofs service in the boot startup list. After the computer is restarted, The AutoFS will be started as the boot service.

4. Access the File System

# Cd/mnt/CDROM

5. Detach a File System

# Umount/mnt/CDROM

OK. After the above steps, we can automatically mount the optical drive and use the content of the optical drive.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.