---
name: "nfsservctl"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/nfsservctl"
---

# nfsservctl(2)

syscall interface to kernel nfs daemon

## NAME

nfsservctl - syscall interface to kernel nfs daemon

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/nfsd/syscall.h>
```

**long nfsservctl(int** *cmd***, struct nfsctl\_arg \****argp***,**                 **union nfsctl\_res \****resp***);**

## DESCRIPTION

*Note*: Since Linux 3.1, this system call no longer exists. It has been replaced by a set of files in the *nfsd* filesystem; see [**nfsd**(7)](/nfsd/7.md).

```
/*
 * These are the commands understood by nfsctl().
 */
#define NFSCTL_SVC        0  /* This is a server process.  */
#define NFSCTL_ADDCLIENT  1  /* Add an NFS client.  */
#define NFSCTL_DELCLIENT  2  /* Remove an NFS client.  */
#define NFSCTL_EXPORT     3  /* Export a filesystem.  */
#define NFSCTL_UNEXPORT   4  /* Unexport a filesystem.  */
#define NFSCTL_UGIDUPDATE 5  /* Update a client's UID/GID map
                                (only in Linux 2.4.x and earlier).  */
#define NFSCTL_GETFH      6  /* Get a file handle (used by mountd(8))
                                (only in Linux 2.4.x and earlier).  */
struct nfsctl_arg {
    int                       ca_version;     /* safeguard */
    union {
        struct nfsctl_svc     u_svc;
        struct nfsctl_client  u_client;
        struct nfsctl_export  u_export;
        struct nfsctl_uidmap  u_umap;
        struct nfsctl_fhparm  u_getfh;
        unsigned int          u_debug;
    } u;
}
union nfsctl_res {
        struct knfs_fh          cr_getfh;
        unsigned int            cr_debug;
};
```

## RETURN VALUE

On success, zero is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## STANDARDS

Linux.

## HISTORY

Removed in Linux 3.1. Removed in glibc 2.28.

## SEE ALSO

[**nfsd**(7)](/nfsd/7.md)
