Linux mount command Mount Umount detailed

Source: Internet
Author: User

Linux mount command Mount Umount detailed


Command format: Mount [options] <-t type > [-o mount Options] < device > < mount point >

Mount [-t vfstype] [-O options] Device dir

which

1.-T vfstype specifies the type of file system that is not normally specified. Mount will automatically select the correct type.

Common types are:

Disc or disc Image: 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


The 2.-o options are primarily used to describe the way devices or files are hooked up. The commonly used parameters are:

Loop: Used to attach a file as a hard disk partition on the system

RO: Hook device with read-only method

RW: Mount device with read-write mode

Iocharset: Specifies the character set used to access the file system

Remount: Re-mount


3.device the device to mount (Mount).


Mount point of the 4.dir device on the system.


Example: Mounting Windows shared folders linuxtest to/winshare

Mount-t Cifs-o username=administrator,password=123456//192.168.1.100/linuxtest/winshare/


To mount a Windows file share:

Mount-t smbfs-o username=admin,password=888888//192.168.1.100/d$/mnt/samba

Mount-t Cifs-o username=xxx,password=xxx//ip/sharename/mnt/dirname

Mount Linux files for NFS sharing:

Mount-t nfs-o RW 192.168.1.2:/usr/www/usr/www

Mount ISO Image:

Mount-o loop-t ISO9660/USR/MYDISK.ISO/HOME/PING.BAO/CD

To mount a USB removable hard disk:

Mount-t Ntfs/dev/sdc1/root/usb

Mount CDROM:

Mount/dev/cdrom/home/ping.bao/cd

Un-mount:

Umount/dev/cdrom/home/ping.bao/cd

Single-user mode to re-mount the root partition:

Mount-o REMOUNT,RW/


-----------------------------------------------------------------------------------------

Syntax: umount [-ahnrvv][-t < file system type >][file system]

Umount-l < mount points | equipment >

Additional note: Umount can dismount the file system currently hanging in the Linux directory.


Parameters

-a removes all file systems recorded in the/etc/mtab.

-h displays Help.

-N Remove the information from the/etc/mtab file.

-R If it fails to dismount successfully, try to mount the file system again in read-only mode.


-t< file System type > Remove only the file system specified in the option.

-V displays detailed information when executed.

-V Displays version information.


[File system] In addition to directly specifying the file system, you can also use the device name or mount point to represent the file system.


Linux mount command Mount Umount detailed

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.