---
name: "setfmac"
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/setfmac"
---

# setfmac(8)

set MAC label for a file system object

## NAME

**setfmac** – set MAC label for a file system object

## SYNOPSIS

**setfmac** \[**-hqR**\] *label* *file ...*

## DESCRIPTION

The **setfmac** utility assigns the specified MAC label to the specified files. The following options are available:

- **-R**

  Set the labels on the file hierarchies rooted in the files instead of just the files themselves.

- **-h**

  If the file is a symbolic link, change the label of the link rather than the file that the link points to.

- **-q**

  Do not print non-fatal warnings during execution.

## SEE ALSO

[mac(3)](/mac/3.md), [mac\_set\_file(3)](/mac_set_file/3.md), [mac\_set\_link(3)](/mac_set_link/3.md), [mac(4)](/mac/4.md), [re\_format(7)](/re_format/7.md), [getfmac(8)](/getfmac/8.md), [setfsmac(8)](/setfsmac/8.md), [mac(9)](/mac/9.md)
