---
name: "setaudit"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/setaudit"
---

# setaudit(8)

specify audit configurations on a process

## NAME

**setaudit** – specify audit configurations on a process

## SYNOPSIS

**setaudit** \[**-46U**\] \[**-a** *auid*\] \[**-m** *mask*\] \[**-s** *source*\] \[**-p** *port*\] *command* *...*

## DESCRIPTION

**setaudit** is a tool to specify audit configurations on a process.

The following options are available:

- **-4**

  Use IPv4.

- **-6**

  Use IPv6.

- **-U**

  Update audit session state rather than overwriting it. By default, **setaudit** will overwrite the entire audit session state using the specified parameters. If **-U** is specified, only the parameters given on the command line will be updated, leaving the rest unchanged.

- **-a** *auid*

  Audit user ID or user name.

- **-m** *mask*

  String representation of an audit mask.

- **-s** *source*

  IPv4 or IPv6 address of a Terminal ID.

- **-p** *port*

  Port of a Terminal ID.

## EXAMPLES

Enable all exe related audit events performed by *command* and its child processes:

```
# setaudit -m ex command
```

## SEE ALSO

[getaudit(2)](/getaudit/2.md), [setaudit(2)](/setaudit/2.md), [au\_mask(3)](/au_mask/3.md), [libbsm(3)](/libbsm/3.md), [audit\_user(5)](/audit_user/5.md), [audit(8)](/audit/8.md)

## HISTORY

The **setaudit** utility was written by Christian S.J. Peron ⟨*csjp@FreeBSD.org*⟩.

## AUTHORS

This manual page was written by Mateusz Piotrowski ⟨*0mp@FreeBSD.org*⟩.
