Mounting is the operation of combining a file system with a directory. A mount point is a directory, which is the entry into a partition or file system.
I. Precautions before MOUNTING:
1, a single file system should not be repeatedly mounted on different mount points.
2. A single directory should not repeatedly mount multiple file systems.
3, the directory is about to be a mount point in theory should be empty directory.
Note: for 2 and 3, if the directory you want to mount is not empty, the original directory will be temporarily gone (not overwritten) after the new file system is mounted, and the system will display the latest mounted file system. After the new partition is uninstalled, the original file system will be displayed again.
Ii. introduction of the order
Mount [-t file system] [-l label name] [-o extra option] [-n] Device name mount point
Mount-l; <== Extra Display label name
Mount-a; <== Install the configuration file/etc/fstab mount all the disks that are not mounted, the boot mount described later is configured here.
Third, mount the Ext2/ext3 file system:
Mkdir/mnt/sda6; <== first create mount point
Mount/dev/sda6/mnt/sda6;
Linux does not typically specify the T type by analyzing the Super block to test mounts.
See:
The/ect/filesystems ==> system specifies the type of test mount file system.
/proc/filesystems ==> The type of file system that the Linux system has loaded.
The driver for the file system is under/lib/module/$ (uname-r)/kernal/fs/.
Iv. mount a CD or DVD disc:
Mkdir/media/cdrom;
Mount-t Iso9660/dev/cdrom/media/cdrom;
Note: After you mount the optical drive, you cannot exit the disc unless you uninstall it.
V. Mount the USB stick:
The steps are consistent with the above.
If you have an NTFS file system, you may need to download additional drivers and install them.
Vi. mount the root directory and mount the directory with no specific directories:
Mount-o remount, rw, auto/; <== re-mounts the root directory, and when it enters single-user maintenance mode, the root directory is mounted as read-only and is re-mounted with this command.
Mount--bind/home/mnt/home; <== to mount a directory to another directory.
Vii. Unloading: Umount
Umount [-FN] device name or mount point
-F: Forced uninstallation
-N: Uninstall without updating/etc/mtab.
Example: Umount/dev/sda6;
Eight, can also be mounted through the label name, temporarily do not understand.