Linux system mount operation Mount detailed

Source: Internet
Author: User

In Linux Systems, the file system is not mounted and cannot be used. Mount, which is to make the file system available in the operating system. The Mount command is used in Linux to mount the file system, with both persistent mounts and temporary mounts.

1. Permanent mount:

Modify the configuration file /etc/fstabtowrite the file system you want to mount in this configuration file, and then use the command

Mount-a Let the configuration information take effect, the mounted file can be used.

To/etc/fstab the contents of the configuration file, the circled line is the information we need to add.

Once mounted, you can use mount to view relevant information and use the command df-h to view the available partitions.

2. Temporary mounts:

MOUNT-T file format mount file mount directory

such as:mount-t ext3/dev/sdb1/opt

Then use the command mount-a to make the mount effective, and the mounted file can be used.

Note: Temporary mounted file systems are disabled when the operating system restarts and cannot be used.

3. Mount can also be used to mount file systems, optical drives, floppy disks,U disks, image files, and so on.

(1) mount the optical drive:

Mount/media/cdrom

(2) Mount u disk:mount-t u disk file format u - disk partition mount directory

such as:mount-t vfat/dev/sdc1/media/usb

(If the operating system has only two drives, the disk block of the U disk is SDCand can be viewed in the/ dev directory)

(3) Mount image file:mount-o loop image file path mount directory

such as:mount-o loop/home/aa.iso/media/iso

4. Unmount the mounted file system:

Umount Mount Directory

such as:umount/opt

Linux system mount operation Mount detailed

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.