Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
/dev/random
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Pseudorandom number generator file in Unix-like operating systems}} [[File:Hexdump of dev urandom.png|thumb|upright=1.5|256 byte hex dump of {{nowrap|{{mono|/dev/urandom}}}}]] In [[Unix-like]] [[operating system]]s, '''{{nowrap|{{mono|/dev/random}}}}''' and '''{{nowrap|{{mono|/dev/urandom}}}}''' are [[special file]]s that provide random numbers from a [[cryptographically secure pseudorandom number generator]] (CSPRNG). The CSPRNG is seeded with [[Entropy_(computing)|entropy]] (a value that provides [[randomness]]) from environmental noise, collected from [[device driver]]s and other sources. Users can obtain random numbers from the CSPRNG simply by reading the file.<ref>{{cite web | url=https://man7.org/linux/man-pages/man7/random.7.html | title=random(7) - Linux manual page | date=2023-02-10 | access-date=2023-11-24 }}</ref> Not all operating systems implement the same methods for {{nowrap|{{mono|/dev/random}}}} and {{nowrap|{{mono|/dev/urandom}}}}. In older operating systems, {{nowrap|{{mono|/dev/random}}}} typically [[Blocking (computing)|blocked]] if there was less [[Entropy (computing)|entropy]] available than requested; more recently (see below for the differences between operating systems) it usually blocks at startup until sufficient entropy has been gathered, then unblocks permanently. The {{nowrap|{{mono|/dev/urandom}}}} device typically was never a blocking device, even if the pseudorandom number generator seed was not fully initialized with entropy since boot. This special file originated in Linux in 1994. It was quickly adopted by other Unix-like operating systems.<ref name=":0" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)