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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. How to Enable IPv6 in CentOS/RHEL 8
  2. iSCSI connection command examples (Cheat Sheet)
  3. How to Audit File Access on Linux
  4. losetup: command not found
  5. faillock Command Examples in Linux
  6. “530 Non-anonymous sessions must use encryption” – while using curl
  7. gs Command Examples in Linux
  8. jobs Command Options In Linux
  9. How to extend ASM disk from OS level in CentOS/RHEL
  10. nsenter: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright