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

# open\_how(2type)

how to open a pathname

## NAME

open\_how - how to open a pathname

## LIBRARY

Linux kernel headers

## SYNOPSIS

```
#include <linux/openat2.h>
```

**struct open\_how {**     **u64  flags;**    /\* **O\_**\* flags \*/     **u64  mode;**     /\* Mode for **O\_**{**CREAT**,**TMPFILE**} \*/     **u64  resolve;**  /\* **RESOLVE\_**\* flags \*/\
     /\* ... \*/ **};**

## DESCRIPTION

Specifies how a pathname should be opened.

The fields are as follows:

- *flags*

  This field specifies the file creation and file status flags to use when opening the file.

- *mode*

  This field specifies the mode for the new file.

- *resolve*

  This is a bit mask of flags that modify the way in which *all* components of a pathname will be resolved (see [**path\_resolution**(7)](/path_resolution/7.md) for background information).

## STANDARDS

Linux.

## HISTORY

Extra fields may be appended to the structure, with a zero value in a new field resulting in the kernel behaving as though that extension field was not present. Therefore, a user *must* zero-fill this structure on initialization.

## SEE ALSO

[**openat2**(2)](/openat2/2.md)
