The shell script can be used on Linux and macOS to distribute random bytes downloaded from a cluster of one or more SwiftRNG devices using a named pipe.

This is probably the simplest way to access true random bytes concurrently from a range of applications running in user spaces.

It can be accomplished with the following steps:

Make sure the software kit is built and installed successfully.

Verify that one or more SwiftRNG devices are plugged into available USB ports.

Open a command line window and enter the following command:


If successfully, the script will create a named pipe /tmp/swiftrng and will make it available for read access.

In a new command line session verify the random bytes are available with the following command:

dd if=/tmp/swiftrng of=/dev/null iflag=fullblock bs=12000000 count=1

You can now access random bytes by reading from /tmp/swiftrng like a regular binary file.

To schedule the pipe server script to run as a background process at boot time follow these steps:

Edit the crontab configuration with the following command:

sudo crontab -e

Add the following line to the existing crontab configuration:

@reboot /usr/local/bin/ >> /var/log/run-swrng-pserver.log 2>&1