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

# ioctl\_nsfs(2)

ioctl() operations for Linux namespaces

## NAME

ioctl\_nsfs - ioctl() operations for Linux namespaces

## SYNOPSIS

```
#include <linux/nsfs.h>  /* Definition of NS_* constants */
#include <sys/ioctl.h>
```

**int ioctl(int** *fd***, unsigned long** *op***, ...);**

## DESCRIPTION

### Discovering namespace relationships

- [**NS\_GET\_USERNS**(2const)](/NS_GET_USERNS/2const.md) [**NS\_GET\_PARENT**(2const)](/NS_GET_PARENT/2const.md)

  ### Discovering the namespace type

- [**NS\_GET\_NSTYPE**(2const)](/NS_GET_NSTYPE/2const.md)

  ### Discovering the owner of a user namespace

- [**NS\_GET\_OWNER\_UID**(2const)](/NS_GET_OWNER_UID/2const.md)

  ## ERRORS

- **ENOTTY**

  *fd* does not refer to a */proc/*pid*/ns/*\* file.

## STANDARDS

Linux.

## SEE ALSO

[**ioctl**(2)](/ioctl/2.md), [**fstat**(2)](/fstat/2.md), [**proc**(5)](/proc/5.md), [**namespaces**(7)](/namespaces/7.md)
