First page Back Continue Last page Overview Graphics
Special devices (2)
/dev/random
Returns random bytes when read. Mainly used by cryptographic programs. Uses interrupts from some device drivers as sources of true randomness (“entropy”).
Reads can be blocked until enough entropy is gathered.
/dev/urandom
For programs for which pseudo random numbers are fine.
Always generates random bytes, even if not enough entropy is available (in which case it is possible, though still difficult, to predict future byte sequences from past ones).
See man random for details.