The role of the MNT directory under Linux
A. Mount English explanation
Boarded Climb Climb Ride on; Ride on; up can be directly understood as "mount"
Mount the CD-ROM, USB device directory, after loading, will be in the mnt more than the corresponding device directory. MNT is the abbreviation for mount.
two. Mount CommandNote: 1. The mount point must be a directory. 2, a partition is mounted on an existing directory, this directory can not be empty, but the contents of the previous directory will not be available after mounting. This is true for the mounting of file systems created by other operating systems. 3, CD-ROM, floppy disk, other operating systems use the format of the file system andLinuxThe file system format used is not the same.
CD is ISO9660; floppy disk is FAT16 or ext2;
WindowsNT is FAT16, NTFS;WINDOWS98 is FAT16, FAT32;
Windows2000 and WindowsXP are FAT16, FAT32, and NTFS.
Before mounting, see if Linux supports the file system format that you want to mount.
three. Using the Mount command when mountingFormat: Mount [-parameter] [device name] [Mount Point] the commonly used parameters are the file system type of the 1.-T specified device, common are: Minix Linux The earliest used file system ext2 Linux currently used file system MSD OS MS-DOS FAT, is FAT16 VFAT WINDOWS98 Common FAT32 NFS Network File system iso9660 CD-ROM standard file system NTFS Windows NT 2000 files System HPFS OS/2 File System Auto automatically detects the file system 2.-o specifies the option to mount the file system. Some are also available in/etc/fstab. Commonly used are: codepage=xxx code page iocharset=xxx character Set ro read-only mount RW to mount the read-write mode nouser so that the general user can not mount the user to enable general users Mount device Note: The mount command does not have a mount point feature, so you should ensure that the mount point already exists when you execute the Mount command. Example: Windows98 is installed in the HDA1 partition, and there are floppy disks and discs on the computer that need to be mounted. # mk/mnt/winc # mk/mnt/floppy # mk/mnt/cdrom # mount-t Vfat/dev/hda1/mnt/winc # mount-t Msdos/dev/fd0 /mnt/floppy # mount-t Iso9660/dev/cdrom/mnt/cdrom If you have a Chinese file name in your Windows98 directory, a bunch of garbled characters are displayed when you use the command above to mount it. This will use the CodePage iocharset option in the-o parameter. CODEPAGE specifies the code page for the file system, the Chinese code is 936;iocharset the specified character set
, Simplified Chinese generally with cp936 or gb2312, now the new release generally need to add a parameter utf8=0. Mount must have an error when mounting file system Linux is not supported, such as Windows2000 's NTFS file system. You can recompile the Linux kernel to gain support for the file system.
About recompiling the Linux kernel, that's not the point. Mount-t Vfat-o codepage=936,iocharset=cp936,utf8=0/dev/hda7/mnt/fFour. Usage examples: 1. Mount the optical drive mount-t Iso9660/dev/cdrom/mnt/cdrom 2. Mount the optical drive, support Chinese mount-t iso9660-o codepage=936,iocharset=cp936/dev/c Drom/mnt/cdrom 3. Mount the Windows partition, FAT file system mount-t Vfat/dev/hda3/mnt/cdrom 4. Mount the Windows partition, NTFS file system mount-t NTFS -O Iocharset=cp936/dev/hda7/mnt/had7 5. Mount the ISO file Mount-o loop/abc.iso/mnt/cdrom 6. Mount the floppy drive mount/dev/fd0/mnt/f Loppy 7. Mount the flash drive Mount/dev/sda1/mnt/cdrom 8. Mount the Windows operating system shared folder Mount-t Smbfs-o username=guest,password=guest// Machine/path/mnt/cdrom 9. Display mounted File system Mount Cat/etc/fstab auto-load FS Cat/etc/mtab currently loaded fs====================== ========================================/etc/fstab File: Etc/fstab is automatically mounted to the Linux file system at boot time. For example, this is an ordinary/etc/fstab:/dev/device mountpoint type rules dump Fsck_ Order---------------------------------------------------------------------------------------/DEV/HDA2/EXT3 Defaults 0 1/dev/hda3 swap swap defaults 0 0/dev/hda5/usr ext3 defaults 0 0/dev/fdo/mnt/flopy ext3 Noauto 0 0/dev/cdrom/mnt/cdrom iso9660 noauto,ro 0 0 1;/dev/device is the device that needs to be mounted, and/hda2 is the second partition of the primary hard disk on the first IDE slot. If the second IDE slot is the third partition of the primary hard drive, it is/DEV/HDC3, which can be viewed under Linux using Fdisk-l. 2;mountpoint is the mount point. /,/usr, swap are all systemsinstallationThe default mount point for the time zone. If you're going to mount a new device, you need to think about it, because this new device will be a permanent part of the filesystem, depending on the FSSTND (file system standard), and its role, user needs. For example, if you want to make it a shared resource, it is a good choice to put it under/home.
3; Type refers to the file system class shape.
4;rules refers to the rules when mounted. Here are a few commonly used: Auto boot automatically mount default according to most permanent file system default settings mount definition Noauto boot not automatically mount Nouser only Superuser can mount the RO read-only permission Mount RW mount the user by readable writable permission Any user can mount please note that the optical drive and floppy drive can only be mounted when the media is installed, so it is Noauto 5;dump is the dump systemBackupTools. This entry is 0, which means that you never back up. If you last backed up with a dump, the number of days since backup is displayed. 6;fsck_order refers to fsck (the order in which fsck checks at startup). 0 means no check, the (/) partition is always 1, the other partitions can only start at 2, and when the numbers are the same check (but not 21). If I want to hook up Windows C on the second IDE slot master hard drive to the file system, then the data entry is:/dev/hdc1/c vfat defaults 0 0 (/C is a pre-established folder as the mount point of the drive. After you modify the/etc/fstab, you must reboot the system to be effective
The role of the MNT directory under Linux