GNU Bash 5.1 Released With New "SRANDOM" Variable As A New Means Of Randomness

Written by Michael Larabel in GNU on 8 December 2020 at 12:05 AM EST. 22 Comments
GNU
GNU Bash 5.1 was released on Monday as the newest feature release to this popular POSIX shell implementation with many extra features.

Beyond the usual bug fixing, Readline updates, and other mostly mundane changes, one interesting addition to note with Bash 5.1 is the new SRANDOM variable. The SRANDOM variable provides random data from the system's entropy engine and cannot be reseeded. In particular, the SRANDOM variable provides a 32-bit random number that relies upon getrandom/getentropy -- with fall-backs to /dev/urandom or arc4random or even another fallback after that if necessary.

New loadable built-ins with Bash 5.1 include mktemp, accept, mkfifo, csv, and cut/lcut. Bash 5.1 also allows SIGINT trap handlers to execute recursively.

For more details on the other changes to GNU Bash 5.1, see the release announcement.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week