Linux: mount command "mount"

Introduction:

After the completion of formatting the file system, you need to mount the file system directory tree that we can use if you want to mount the directory is not empty, then mount the file system directory under the original things will disappear temporarily. For example, suppose your / home directory of the original root (/) in the same file system, originally had under / home / test and / home / vbird two directories. Then you want to add a new hard disk, and directly mount / under home, then when you mount a new division grooves, the / home directory shows the data for the new tank division, as the original test and this vbird two temporary directory will be hidden out! Not be overwritten, but temporary hiding, until after the new division grooves are dismounted, the / home original content will come out again

Format:

[root @ the WWW ~] # Mount -a 
[the WWW root @ ~] # Mount [the -l] 
[the WWW root @ ~] # Mount [-t file system] [-LLabel name] [-o extra options] device file name mount points

 

Where the '-t' and '-o' the order is not important

parameter:

1. Type '-t' specifies a file system may automatically determine the type may be omitted.

Common types are:

  • Optical disk or CD-ROM image (iso): iso9660
  • DOS fat16 file system : msdos
  • Windows 9x fat32 file system : vfat
  • Windows NT ntfs file system : ntfs
  • Mount Windows File Network Share: smbfs
  • UNIX (LINUX) file network share: nfs
  • File System: ext3 / ext2

2 .'- o 'can take back plus some additional parameters when mounting! Let's say the account, password, read and write permissions.

  • ro, rw: mount the file system read-only (ro) or rewritable (RW)
  • async, sync: This file system is the use of synchronous write (sync) or asynchronous (async) memory mechanism, please refer to the file system operation. The default is async.
  • auto, noauto: This allows the partition to be automatically mounted to mount -a (Auto)
  • dev, nodev: whether to allow on this partition, to create a device file? dev is permissible
  • suid, nosuid: whether to allow this partition contains a suid / sgid file format?
  • exec, noexec: whether to allow binary files have to run on this partition?
  • user, nouser: whether to allow this partition to allow any user to run the mount? Generally only root can mount, but issued a user parameter, you can let the general user can perform this partition mount.
  • defaults: default is: rw, suid, dev, exec, auto, nouser, and async
  • remount: When remounting, this error in the system, upgrade or re-parameters, useful

3. -a: In accordance with the configuration file / etc / fstab data will all unmounted disks are mounted up
4. -l: simply enter the mount displays information presently mounted. Label names can be added with the -l!

5. -n: In the default case, the system will actually mounts the real write / etc / mtab in order to facilitate the operation of other programs. However, in some cases (such as single maintenance mode) To avoid problems, will deliberately not written. At this point you have to use the -n option a.
6. -L: In addition to using the device file system name (e.g. / dev / hdc6), you can also use a file system header name

demo:

mount -o remount rw -t ext3 /

This is the command after a period of ZLG development board boot to be entered otherwise the file can not be operated. Decomposition: -o, remount remount, rw read, -t specifies the file system type, ext3 file system type;

Guess you like

Origin www.cnblogs.com/ScarecrowMark/p/11414220.html