Latest web development tutorials

Linux mount command

Linux mount command

Linux command Daquan Linux command Daquan

Linux mount command is often used to command, which is used to mount the file system Linux outside.

grammar

mount [-hV]
mount -a [-fFnrsvw] [-t vfstype]
mount [-fnrsvw] [-o options [,...]] device | dir
mount [-fnrsvw] [-t vfstype] [-o options] device dir

Parameter Description:

  • -V: Display the program version
  • -h: display auxiliary information
  • -v: shows a more messages, usually used to debug and -f.
  • -a: all file systems / etc / fstab defined hang.
  • -F: This command is usually used in conjunction with -a, it will generate an itinerary for each mount responsible for the implementation of the action. When the system needs to mount a large number of NFS file systems can speed up the mount operation.
  • -f: commonly used in debugging purposes. It will mount the action does not perform the actual hanging, but simulate the whole process to hang. Usually used in conjunction with -v.
  • -n: In general, mount will write a data in / etc / mtab after hanging in. However, in the absence of the system can be written to the file system exists can use this option to cancel this action.
  • -sr: equal -o ro
  • -w: equal -o rw
  • -L: The hard disk partition containing a specific tag hanging.
  • -U: The file system partition file number is hanging down. -L And -U there must be meaningful only in the / proc / partition this file.
  • -t: Specifies the file system type, usually do not have to be specified. mount will automatically select the correct patterns.
  • -o async: Open non-synchronous mode, all files read or write actions are performed using asynchronous mode.
  • -o sync: synchronous execution mode.
  • -o atime, -o noatime: atime when opened, will be updated each time the file is read "one-call time" file. When we use the flash file system option this option may be turned off to reduce the number of writes.
  • -o auto, -o noauto: turn on / off the automatic hang up mode.
  • -o defaults: Use the default option rw, suid, dev, exec, auto, nouser, and async.
  • -o dev, -o nodev-o exec, -o noexec allows the executable file to be executed.
  • -o suid, -o nosuid:
  • Allow executable file execution with root privileges.
  • -o user, -o nouser: Users can execute mount / umount operation.
  • -o remount: a file system has been linked to lower re-hung in different ways. For example, the original system is read-only, read-write mode can now use the re-hang.
  • -o ro: read-only mode by hanging.
  • -o rw: read-write mode can be used to hang.
  • -o loop =: use loop mode is used to partition a hard disk as a file system mount.

Examples

The / dev / hda1 hanging under / mnt.

#mount /dev/hda1 /mnt

The / dev / hda1 hanging under / mnt with a read-only mode.

#mount -o ro /dev/hda1 /mnt

The /tmp/image.iso this disc image file using the hanging loop mode under / mnt / cdrom. In this way the network can be found on ships Linux DVD ISO file can view its contents without burning a CD case.

#mount -o loop /tmp/image.iso /mnt/cdrom

Linux command Daquan Linux command Daquan