Syntax: mount-t type-o mount mode source path target path
-T detailed options:
CD or CD Image: iso9660
DOS fat16 file system: msdos
Windows 9x fat32 file system: vfat
Windows NT ntfs file system: ntfs
Mount Windows File network sharing: Recommended cifs for smbfs (kernel support required)
Network sharing for UNIX (LINUX) files: nfs
-O detailed options:
Loop: used to connect a file to the system as a hard disk partition.
Ro: mounting a device in read-only mode
Rw: mounting a device in read/write mode
Iocharset: specifies the character set used to access the file system, for example, iocharset = utf8
Remount: remount
The core of Windows network sharing is SMB/CIFS. samba is required to mount windows Disk sharing in linux. But don't worry. Most popular linux distributions have installed samba packages by default.
1. Create a directory for mount point)
# Mkdir-p/mnt/test
2. mount the windows shared directory with mount. The format is as follows:
# Mount [-t vfstype] [-o options] device dir
Where:
1)-t vfstype specifies the type of the file system, which is usually not required. Mount automatically selects the correct type. Common types include:
CD or CD Image: iso9660
DOS fat16 file system: msdos
Windows 9x fat32 file system: vfat
Windows NT ntfs file system: ntfs
Mount Windows File network sharing: smbfs
Network sharing for UNIX (LINUX) files: nfs
2)-o options is mainly used to describe how a device or file is mounted. Common parameters include:
Loop: used to mount a file to a system as a hard disk partition.
Ro: mounting devices in read-only mode
Rw: mounting devices in read/write mode
Iocharset: specifies the character set used to access the file system
3) device to be mounted.
4) mount point of the dir device on the system ).
Example:
1
# Mount-t cifs-o username = "admin", password = "123456" // 192.168.1.1/share // mnt/test/
Note: admin and 123456 are the usernames and passwords of windows machines, and // 192.168.1.1/share/is the shared directory address of windows machines.
In this way, files on windows disks can be accessed through/mnt/test on linux.
3. If you want to cancel the mounting, use the unmount command.
# Unmount/mnt/test
The above operations are successfully tested in CentOS6.4 environment.