Linux --mount command

Use File System
1>. Mount: Associate the new file system with the current root file system.
Command: mount
Syntax: mount device mount point
Explanation : Device
1>. Device file: /dev/sdb1
2>. Volume label: LABEL="" (the volume label name in quotation marks)
3>. UUID: UUID=""
Mount point:
1>. This directory is not used by other processes
2>. The directory must exist in advance
3>. The original files in the directory will be temporarily hidden
4>.
Linux provides two mount points by default: /mnt (to mount an additional partition file system) and /media (to mount a mobile device). Note: After the mount is complete, you need to access the files on the corresponding file system through the mount point.
Example: [root@biaozhi ~]# mkdir /mnt/test
[root@biaozhi ~]# mount /dev/sdb1 /mnt/test/
[root@biaozhi ~]# cd /mnt/test/
[root@biaozhi test] # ls
displays the result: lost+found indicates that the mount is successful.
Additional :
mount: Displays the devices and mount points that have been mounted by the current system.
Parameters : -a: indicates that all file systems defined in the /etc/fstab file are mounted
-n: By default, each time the mount command mounts a device, it will save the mounted device information to the /etc/mtab file. Using the -n option means that the information is not written to this file when the device is mounted. Example: [root@biaozhi ~]# mount /dev/sdb1 /mnt/test/ [root@biaozhi ~]# cat /etc/mtab  shows partial results: /dev/sdb1 /mnt/test ext3 rw 0 0 [root@ biaozhi ~]# umount /mnt/test/ [root@biaozhi ~]# mount -n /dev/sdb1 /mnt/test/ [root@biaozhi ~]# cat /etc/mtab  shows that there is no /dev/sdb1 / in the result mnt/test ext3 rw 0 0







-t FSTYPE: Specifies the type of the file system being mounted on the device. If this option is not used, mount will call the blkid command to obtain the type of the corresponding file system. -r: read-only mount -w: read-write mount (except CD) -o: specify additional mount options. remount: Remount the current file system. ro: read-only mount rw: read-write mount (except CD-ROM) Example: [root@biaozhi ~]# mount /dev/sdb1 /mnt/test/ [root@biaozhi ~]# mount -o remount,ro /dev /sdb1 2>. Uninstall: remove the association between a file system and the current root file system. Command: umount Syntax: umount device or umount mount point











Unmount Notes: The mounted device is not used by the process! Example: [root@biaozhi ~]# umount /dev/sdb1 [root@biaozhi ~]# umount /mnt/test/

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324843698&siteId=291194637