← 返回命令列表

Linux command

exports 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

View current exports

exportfs -v

Reload exports configuration

sudo exportfs -ra

Export directory temporarily

sudo exportfs -o [rw,sync] [client:/path]

Unexport directory

sudo exportfs -u [client:/path]

说明

/etc/exports defines which directories are shared via NFS (Network File System). Each line specifies a path and which clients can access it with what options. The exportfs command manages the export table at runtime, reading from /etc/exports and updating the kernel's export table without restarting NFS services.

参数

exportfs -r
Re-export all directories.
exportfs -a
Export all entries in /etc/exports.
exportfs -u _client:/path_
Unexport directory.
exportfs -v
Verbose; show current exports.

FAQ

What is the exports command used for?

/etc/exports defines which directories are shared via NFS (Network File System). Each line specifies a path and which clients can access it with what options. The exportfs command manages the export table at runtime, reading from /etc/exports and updating the kernel's export table without restarting NFS services.

How do I run a basic exports example?

Run `exportfs -v` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does exportfs -r do in exports?

Re-export all directories.