大网数据广告活动
Windows排障命令

mount

· 52CE 我爱测

Reference article for the mount command, which mounts Network File System (NFS) network shares.

A command-line utility that mounts Network File System (NFS) network shares. When used without options or arguments, mount displays information about all mounted NFS file systems.

Note: This utility is available only if Client for NFS is installed.

Syntax

mount [-o <option>[...]] [-u:<username>] [-p:{<password> | *}] {\\<computername>\<sharename> | <computername>:/<sharename>} {<devicename> | *}

Parameters

Parameter Description
-o rsize=<buffersize> Sets the size in kilobytes of the read buffer. Acceptable values are 1, 2, 4, 8, 16, and 32; the default is 32 KB.
-o wsize=<buffersize> Sets the size in kilobytes of the write buffer. Acceptable values are 1, 2, 4, 8, 16, and 32; the default is 32 KB.
-o timeout=<seconds> Sets the time-out value in seconds for a remote procedure call (RPC). Acceptable values are 0.8, 0.9, and any integer in the range 1-60; the default is 0.8.
-o retry=<number> Sets the number of retries for a soft mount. Acceptable values are integers in the range 1-10; the default is 1.
-o mtype=`{soft hard}`
-o lang=`{euc-jp euc-tw
-o fileaccess=<mode> Specifies the default permission mode of new files created on the NFS share. Specify mode as a three-digit number in the form ogw, where o, g, and w are each a digit representing the access granted the file's owner, group, and the world, respectively. The digits must be in the range 0-7, including:<ul><li>0: No access</li><li>1: x (execute access)</li><li>2: w (write access)</li><li>3: wx (write and execute access)</li><li>4: r (read access)</li><li>5: rx (read and execute access)</li><li>6: rw (read and write access)</li><li>7: rwx (read, write, and execute access)</li></ul>
-o anon Mounts as an anonymous user.
-o nolock Disables locking (default is enabled).
-o casesensitive Forces file lookups on the server to be case sensitive.
-o sec=`{sys krb5
-u:<username> Specifies the user name to use for mounting the share. If username isn't preceded by a backslash ( \ ), it's treated as a UNIX user name.
-p:<password> The password to use for mounting the share. If you use an asterisk (*), you're prompted for the password.
<computername> Specifies the name of the NFS server.
<sharename> Specifies the name of the file system.
<devicename> Specifies the drive letter and name of the device. If you use an asterisk (*) this value represents the first available driver letter.

Examples

To mount the NFS share anonymously on network drive Z, type:

mount -o anon \\ServerIP\ShareName Z:

Note: In order for this parameter to function as intended, the NFS server must allow anonymous access.

To mount the NFS share and disable file locking for network drive Z, type:

mount -o nolock \\ServerIP\ShareName Z:

To mount the NFS share with permissions for the ogw set as rwx, rw, r, and to continuously reconnect to the NFS server if the connection is lost for network drive Z, type:

mount -o fileaccess=764 mtype=hard \\ServerIP\ShareName Z:

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 09/27/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。