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

# fsirand(8)

randomize inode generation numbers

## NAME

**fsirand** – randomize inode generation numbers

## SYNOPSIS

**fsirand** \[**-b**\] \[**-f**\] \[**-p**\] *special* \[*special ...*\]

## DESCRIPTION

The **fsirand** utility installs random generation numbers on all the inodes for each file system specified on the command line by *special*. This increases the security of NFS-exported file systems by making it difficult to \`\`guess'' filehandles.

*Note*: [newfs(8)](/newfs/8.md) now does the equivalent of **fsirand** itself so it is no longer necessary to run **fsirand** by hand on a new file system. It is only used to re-randomize or report on an existing file system.

The **fsirand** utility should only be used on an unmounted file system that has been checked with [fsck(8)](/fsck/8.md) or a file system that is mounted read-only. The **fsirand** utility may be used on the root file system in single-user mode but the system should be rebooted via \`\`reboot -n'' afterwards.

## OPTIONS

The available options are as follows:

- **-b**

  Use the default block size (usually 512 bytes) instead of the value gleaned from the disklabel.

- **-f**

  Force **fsirand** to run even if the file system on *special* is not marked as clean.

- **-p**

  Print the current generation numbers for all inodes instead of generating new ones.

## SEE ALSO

[fs(5)](/fs/5.md), [fsck(8)](/fsck/8.md), [newfs(8)](/newfs/8.md)

## HISTORY

The **fsirand** utility appeared in SunOS 3.x.

This version of **fsirand** first appeared in OpenBSD 2.1.

A FreeBSD version first appeared in FreeBSD 2.2.5.

## AUTHORS

Todd C. Miller ⟨*Todd.Miller@courtesan.com*⟩

## CAVEATS

Since **fsirand** allocates enough memory to hold all the inodes in a given cylinder group it may use a large amount of memory for large disks with few cylinder groups.
