---
name: "random"
section: "6"
platform: "linux"
package: "bsdgames"
version: "2.17-35"
release: "Debian 13 (Trixie)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/random"
---

# random(6)

random lines from a file or random numbers

## NAME

**random** – random lines from a file or random numbers

## SYNOPSIS

**random** \[**-er**\] \[*denominator*\]

## DESCRIPTION

**random** reads lines from the standard input and copies them to the standard output with a probability of 1/denominator. The default value for *denominator* is 2.

The options are as follows:

- **-e**

  If the **-e** option is specified, **random** does not read or write anything, and simply exits with a random exit value of 0 to *denominator*-1, inclusive.

- **-r**

  The **-r** option guarantees that the output is unbuffered.

## SEE ALSO

[fortune(6)](/fortune/6.md)
