Linux command: File System-mount

Source: Internet
Author: User
Name: mount permission: System Administrator or user allowed in/etc/fstab: mount [-hV] mount-a [-fFnrsvw] [-tvfstype] mount [-fnrsvw] [-ooptions [,...] device | dirm... name: mount
Permission: System Administrator or user allowed in/etc/fstab
Usage:
Mount [-hV]
Mount-a [-fFnrsvw] [-t vfstype]
Mount [-fnrsvw] [-o options [,...] device | dir
Mount [-fnrsvw] [-t vfstype] [-o options] device dir
Note:
  
Interpret the content of an archive into an archive system, and then place it on a location in the directory. After this command is successfully executed, all files under this command cannot be called until we use umnount to remove the file system.
  
This command can be used to mount any file system. you can even use the-o loop option to split a general file into a hard disk and then mount it to the system. This function is very useful for interpreting image files of ramdisk, romdisk, or ISO 9660.
  
Parameters
  
-V
  
Show program version
-H
  
Show auxiliary messages
-V
  
Displays more information, usually used with-f for debugging.
-
Mount all file systems defined in/etc/fstab.
  
-F
This command is usually used together with-a, which generates a route for each mount action. You can speed up mounting when the system needs to mount a large number of NFS file systems.
  
-F
It is usually used for debugging. It will make the mount not execute the actual action, but simulate the entire process of mounting. It is usually used with-v.
  
-N
Generally, after mount is mounted, a message is written to the/etc/mtab. However, you can use this option to cancel this operation if the file system does not exist.
  
-S-r
Equal to-o ro
  
-W
Equal to-o rw
  
-L
Separate the hard disks with specific tags.
  
-U
Mount the file system with the file division serial number. -L and-U must exist in the/proc/partition file to make sense.
  
-T
Specifies the type of the file system, which is usually not required. Mount automatically selects the correct type.
  
-O async
When the non-synchronous mode is enabled, all file read and write operations are performed in non-synchronous mode.
  
-O sync
Run the command in synchronization mode.
  
-O atime
-O noatime
When atime is enabled, the system updates the "last call time" of the file each time the file is read 』. When we use the flash file system, we may choose to disable this option to reduce the number of writes.
  
-O auto
-O noauto
Enable/disable automatic mounting mode.
  
-O defaults
Use the default options rw, suid, dev, exec, auto, nouser, and async.
  
-O dev
-O nodev-o exec
-O noexec
The execution file can be executed.
  
-O suid
-O nosuid
The execution file can be executed with the root permission.
  
-O user
-O nouser
You can perform the mount/umount action.
  
-O remount
You can use different methods to re-mount an existing file system. For example, a previously read-only system can be re-mounted in the read-write mode.
  
-O ro
Use the read-only mode.
  
-O rw
In Read/write mode.
  
-O loop =
Loop mode is used to separate an archive into a hard disk and mount it to the system.
  
Example
  
Mount/dev/hda1 under/mnt.
  
# Mount/dev/hda1/mnt
  
Mount/dev/hda1 in read-only mode under/mnt.
  
# Mount-o ro/dev/hda1/mnt
  
Mount the image file of the/tmp/image. iso disc in loop mode under/mnt/cdrom. In this way, you can view the Linux optical disc ISO files that can be found on the network without burning them into CDs.
  
 
# Mount-o loop/tmp/image. iso/mnt/cdrom
 
 
 
 
Practical commands: mount-t cifs // 192.168.77.4/StaticData/win-o uid = 500, gid = 500, file_mode = 0777, dir_mode = 0777, username = share, password = share, codepage = cp936, iocharset = utf8
 
 
 
From the trace
Related Article

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.