Linux system management and maintenance - mount /umount command

  
 

Function description: Mount and uninstall the specified file system. In the third chapter we have talked about the mount/umount command. Here we will go into depth about the use of mount/umount. Use the format: mount [options] [-L<tags>] [-o<options>] [-t<filesystem type>] [device name] [mount point]umount [mount point] option meaning : Detailed option meanings refer to the following table

Option Meaning-a Load all devices specified in the file /etc/fstab. -n Do not log the load information in the /etc/mtab file -r Load the device read-only. -w Loads the device in read-write mode, which is the default setting of mount. -f or -v does not load the device, just check the mount status of mount.

-L<Label>: The label is actually an alias for the disk partition identifier. The label can be named casually. This is easy to remember. The device name of the disk partition under Linux is hard to remember. It is simple to use the label instead of the device name. Easy to remember. -o<options>: Specifies options when loading the file system. These options include: async: Performs file system input and output actions in a non-synchronous manner. Atime: Updates the access time of the inode every time it is accessed. By default, the cancel option is noatime. Auto: This option must be specified in the /etc/fstab file. When the -a option is executed, the device set to auto is loaded and deselected as noauto. Dev: A character or block device on a readable file system with the cancel option set to nodev. Exec: Executable binary, the cancel option is noexec. Noatime: The access time of the inode is not updated every time it is accessed. Noauto: With this option added, you cannot load with the -a option. Nodev: Do not read characters or block devices on the file system. Noexec: Unable to execute binary file. Nosuid: Turns off the set-user-identifier (set user ID) and set-group-identifer (set group ID) setting bits. Nouser: Makes the user unable to perform the loading operation, the default setting. Iocharset=XXX specifies the character set to use when mounting the partition. Codepage=XXX Specifies the inner code table to use when mounting the partition. Remount: Reload the device. Usually used to change the setting status of the device. Ro: Loaded in read-only mode. Rw: Load in read/write mode. Suid: Starts the set-user-identifier (set user ID) and set-group-identifer (set group ID) setting bits, and the cancel option is nosuid. Sync: Performs file system input and output actions in a synchronous manner. User: Allows a general user to load the device. Defaults: Use the default options. The default options are rw, suid, dev, exec, anto nouser, and async. -t<filesystem type>: Specifies the file system type of the device. Common options are: ext3/ext2: Linux's current common file system. Msdos: FAT for MS-DOS. Vfat of Vfat:Win85/98. Nfs: network file system. Iso9660: Standard file system for CD-ROM discs. Ntfs:Windows
NT file system. Device Name: The device ID of the hard disk partition on Linux, similar to /dev/sda1, /dev/hda2, and so on. Mount point: A directory specified under the Linux system. Example: 1. Mount the CD image file to the Linux system: [root@localhost/]#mount -o loop -t iso9660 /iso/RHEL4-U4-i386-AS-disc1.iso /ixdba#Requires access to the ISO image file under Windows Third-party software such as virtual CD-ROM, and the CD image file in linux system can be read directly by mounting. #该的“loop” Option means to attach an image file as a hard disk partition to the system, "-t"; specify the image file type is iso9660, which is the standard file system of the CD. “/iso/RHEL4-U4-i386-AS-disc1.iso“ indicates the path of the image file, and ”/ixdba“ indicates the mount point. After the mount is successful, the contents of the image file can be accessed through the /ixdba directory. . 2. Windows+linux dual system coexistence environment, mount the D drive under Windows to the /mnt/d directory under linux, and support Chinese, use the following command: [root@localhost/]#mount -t vfat -o codepage= 936, iocharset = cp936 /dev /hda3 /mnt /d # above, the "-t vfat" option indicates that the D drive that needs to be mounted is a fat format file system, & rdquo; - o & ldquo; behind the option specifies the partition hang after the carrier support Chinese display, & rdquo; /dev /hda3 & ldquo; D drive the windows in linux hardware identifier, & rdquo; /mnt /d & ldquo; is specified on linux system mount point, mount success by accessing linux /mnt /d directory to access the contents of the d drive under the windows. 3. Mount a shared partition on another Linux system in a read-only manner on a Linux system. This is the network filesystem (NFS) file system that we will cover in depth later. Use the following command: [root@localhost/] #mount -t nfs -o ro 192.168.60.133:/home/ixdba /mnt/nfs# In the above command, <quo;-t nfs“ specifies that the mounted file system type is nfs, ”-o ro“ specified as read-only it mounts, & ldquo; 192.168.60.133: /home /ixdba & rdquo; represents the ip address & ldquo; 192.168.60.133 & rdquo; another a linux system /home /ixdba directory shared out, & ldquo; /mnt /nfs & rdquo; a mount point on the machine linux system.

Copyright © Windows knowledge All Rights Reserved