• 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 Examples in Linux

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.

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. CentOS / RHEL LVM : Backing Up Volume Group Metadata
  2. mkinitcpio Command Examples in Linux
  3. shred Command Examples in Linux
  4. dnstracer: command not found
  5. slocate command in linux
  6. User Unable To Edit crontab, Error: “/tmp/crontab.Lm34gsJV: Permission denied”
  7. dillo: A lightweight web browser intended for slow computers
  8. asciiart Command Examples in Linux
  9. dpkg-reconfigure Command Options
  10. run-mailcap Command Examples in sample

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright