Starting from Linux kernel v5.4, the HAVEGED inspired algorithm has been included in the Linux kernel.
Linux provides cryptographic randomness through /dev/random and /dev/urandom, both backed by the kernel’s central entropy pool. Modern kernels seed and maintain this pool using diverse sources—interrupt timing, CPU jitter, hardware RNGs, and virtualization-provided entropy—allowing the CRNG to initialize early and stay well‑seeded under normal workloads. On current systems (kernel 5.4+), these built‑in mechanisms are typically sufficient without additional entropy services.
# Random number between 0 and 32767
echo "$RANDOM"shuf -i 1-10000000 -n 1< /dev/urandom tr -dc 0-9 | head -c 16
< /dev/urandom tr -dc 0-9 | head -c 32
< /dev/urandom tr -dc A-Za-z0-9 | sha256sum | head -c 32
< /dev/urandom tr -dc A-Za-z0-9_- | head -c 32# Random number between 0 and 32767
echo "$RANDOM"jot -r 1 1 10000000# brew install coreutils
shuf -i 1-10000000 -n 1tr -dc A-Za-z0-9 < /dev/urandom | shasum -a 256 | head -c 16
tr -dc A-Za-z0-9 < /dev/urandom | shasum -a 256 | head -c 32
tr -dc A-Za-z0-9 < /dev/urandom | shasum -a 512 | head -c 32
tr -dc A-Za-z0-9_- < /dev/urandom | head -c 32Get-Random -Minimum 1 -Maximum 1000000000000000000$bytes=[byte[]]::new(32);[System.Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($bytes);([BitConverter]::ToString([System.Security.Cryptography.SHA256]::Create().ComputeHash($bytes)) -replace '-','').Substring(0,16)import random; print(random.randint(1, 100000))
python3 -c "import os,hashlib;print(hashlib.sha256(os.urandom(32)).hexdigest()[:16])"
perl -e 'print 1 + int(rand(10000)), "\n"'
perl -MDigest::SHA=sha256_hex -e 'print substr(sha256_hex(rand() . $$ . time . {}), 0, 16), "\n"'