mcookie: command not found

“mcookie” is a command line utility in Unix-like operating systems that generates random 128-bit hexadecimal numbers. These numbers can be used as session keys or other forms of unique identification. The mcookie command generates a random 128-bit hexadecimal number and outputs it to the terminal. The output can be redirected to a file or used as input for other commands if needed.

The generated numbers are considered to be cryptographically secure, meaning that they are suitable for use as session keys or for other applications that require unique and unpredictable values. Using mcookie is a simple and convenient way to generate random numbers that can be used for various purposes, including secure communication, random number generation for cryptography, and unique identifier generation.

If you encounter the below error while running the command mcookie:

mcookie: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install util-linux
Ubuntu apt-get install util-linux
Alpine apk add util-linux
Arch Linux pacman -S util-linux
Kali Linux apt-get install util-linux
CentOS yum install util-linux
Fedora dnf install util-linux
OS X brew install util-linux
Raspbian apt-get install util-linux

mcookie Command Examples

1. Generate a random number:

# mcookie

2. Generate a random number, using the contents of a file as a seed for the randomness:

# mcookie --file path/to/file

3. Generate a random number, using a specific number of bytes from a file as a seed for the randomness:

# mcookie --file path/to/file --max-size number_of_bytes

4. Print the details of the randomness used, such as the origin and seed for each source:

# mcookie --verbose
Related Post