Mount [shell][mount -o loop]

Function description: mount command.

Syntax introduction: mount [-parameter] [device name] [mount point]

Parameter Description:

-a: Install all file systems listed in the /etc/fstab file.

-f: Pretend to mount, make it look like checking devices and directories, but does not actually mount the file system.

-n: Do not record the installation in the /etc/mtab file.

-r: Mount the file system as read-only.

-v: Verbose display of installation information.

-w: Mount the file system as writable, which is the default for the command.

-t <file system type>: specifies the file system type of the device, common ones are:

    ext2 linux currently commonly used file system
    msdos MS-DOS fat is fat16
    vfat windows98 commonly used fat32
    nfs network file system
    iso9660 CD-ROM disc standard file system
    ntfs windows NT/2000/XP file system
    auto automatically detects the file system

-o <option>: Specify the options when mounting the file system, some can also be written in /etc/fstab. Commonly used are:

    Defaults Use default values ​​for all options (auto, nouser, rw, suid)
    auto/noauto allow/disable mount with –a option
    dev/nodev interpret/do not interpret special devices on filesystems
    exec/noexec allow/disable Execute binary code
    suid/nosuid Confirm/do not confirm suid and sgid bit
    user/nouser Allow/disallow ordinary users to mount
    codepage=XXX code page
    iocharset=XXX character set
    ro Mount
    rw in read-only mode Mount
    remount in read-write mode Reinstall the already installed file system
    loop loop Mount the "circle device" and "ISO image file"

Loop-back devices -

A loopback device ('loopback device') allows the user to virtualize a block device with an ordinary disk file. Imagine a disk device, all read and write operations to it will be redirected to read and write an ordinary file called disk-image instead of manipulating the tracks and sectors of the actual disk or partition. (Of course, the disk-image must exist on a real disk, which must be larger than the virtual disk.) The loopback device allows you to use a normal file like this.

Loopback devices are named /dev/loop0, /dev/loop1, and so on. Each device can virtualize a block device. Note that only superusers have permission to set the loopback device.

Loopback devices are used like any other block device. In particular, you can create a filesystem on this device and mount it on the system like a normal disk. Such a file system that stores all its contents in an ordinary file is called a virtual file system (Translator's Note: This usage is not common. VFS usually refers to something else, such as referring to the Linux kernel The code level of the abstraction of the file system in the file system, etc.).

Guess you like

Origin blog.csdn.net/y13182588139/article/details/126258767