• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

mcookie: command not found

by Deepika

“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

Filed Under: Linux

Some more articles you might also be interested in …

  1. mate-screenshot Command Examples in Linux
  2. How to view file size/details from ls command in Unix
  3. wajig: command not found
  4. bzegrep: Find extended regular expression patterns in bzip2 compressed files using egrep
  5. gitmoji Command Examples
  6. ssh-copy-id: command not found
  7. RPM : package installation Error : cpio: read failed
  8. bc: command not found
  9. CentOS / RHEL 6 : How to configure kdump
  10. ln Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright