first, the purposeThis article describes file system mount and unload commands for Mount and umount.
The Mount command is responsible for mounting the file system on the device to the mount point of the system, and the Umount command is responsible for unloading the file system on the mount point.
This article will select the ubuntu14.04 release as the basis for the description.
ii.. Fstab documentsThe/etc/fstab configuration file in the Linux system records the file system information, and Linux mounts all the file systems recorded in the file at startup. In the/etc directory, there is also a configuration file called mTAB, which records the file system that has been mounted on the system, noting the difference between the file and the fstab.
The file contains a total of 6 field information: Device, mount point, File system type, mount option, Backup frequency, fsck check order.
For example, the following Fstab file shows that the/DEV/SDA1 device is mounted to the system's/mount point, and the file system type is EXT4.
three, Mount commandThe Mount command is used to mount the device on a user-specified system mount point.
Syntax: Mount [Options] [-o mount_options] Device directory
Options
-A: Mount the file system specified in the/etc/fstab configuration file.
-r: Mount the file system in read-only mode.
-W: Mounts the file system in read/write mode.
-T Fstype: Specifies that the mounted file system type is fstype.
-O mount_options: Specify mount options on the command line.
Mount_options:
Dev: Allows reading of character devices or block devices on the file system.
EXEC: Run the program on the Mount partition.
NOEXEC: Disables the execution of programs on this file system.
Nouser: Prevents non-root users from mounting or uninstalling the file system.
User: Allows an ordinary user to mount the file system, but prevents other ordinary users from uninstalling the file system.
Users: Allows any user to mount or uninstall the file system.
The usual mount commands are given below:
1. List the file systems that are already mounted on the current system
Usage: Mount
2. Mount the removable hard drive to the/media directory
Usage: Mount/dev/sdb1/media
3. Mount the optical drive to the/media directory
Usage : mount-t iso9660/dev/hdc/media
Iv. Examplesas can be seen, the system has been mounted/dev/sda1 and/DEV/SDA3 devices, but also mount the Sysfs, Proc, TMPFS and other memory forms of the file system; Mount the removable hard disk device using the Mount command DEV/SDB1 to the/media directory.
v. Umount commandThe Umount command is used to unload a file system that is already mounted under a directory.
Syntax: umount [Options] Directory
Options
-A: Uninstalls all file systems recorded in the/etc/mtab file.
-T Fstype: Uninstalls only the Fstype type of file system.
The following is a common to umount command:
1. Display the file system under one mount point
Usage : Umount/media
Vi. Examplesas you can see, the mobile hard drive device/DEV/SDB1 under the/media mount point was successfully uninstalled using the Umount/media command.
Vii. Summary
This article describes the mount and Umount tools under Linux, which mount is used to mount a device to a specified mount point in the system, and Umount is used to unload a file system on a mount point.
Copyright Notice:
Original works, such as non-commercial reprint, please specify the source, such as commercial reprint publication, please contact the author.
Linux essay (9)---mount and umount