Close Menu
    Facebook X (Twitter) Instagram
    Command Linux
    • About
    • How to
      • Q&A
    • OS
      • Windows
      • Arch Linux
    • AI
    • Gaming
      • Easter Eggs
    • Statistics
    • Blog
      • Featured
    • MORE
      • IP Address
      • Man Pages
    • Write For Us
    • Contact
    Command Linux
    Home - man page - MCOOKIE

    MCOOKIE

    WillieBy WillieApril 21, 2026Updated:April 21, 2026No Comments2 Mins Read
     

    NAME

    mcookie – generate magic cookies for xauth  

    SYNOPSIS

    mcookie [options]  

    DESCRIPTION

    mcookie generates a 128-bit random hexadecimal number for use with the X authority system. Typical usage:
    xauth add :0 . `mcookie`

    The "random" number generated is actually the output of the MD5 message digest fed with random information from one of the sources /dev/urandom, /dev/random, or libc pseudo-random functions in this preference order.  

    OPTIONS

    -f, –file=FILE
    Use additional file as a macig cookie random seed. When file is defined as ‘-‘ character input is read from stdin.
    -m, –max-size=number
    Read form FILE only number of bytes. This option is meant to be used when reading additional randomness from a device.
    The number argument may be followed by the multiplicative suffixes KiB=1024, MiB=1024*1024, and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB=1000, MB=1000*1000, and so on for GB, TB, PB, EB, ZB and YB.
    -v, –verbose
    Inform where randomness originated, with amount of entropy read from each source.
    -V, –version
    Display version information and exit.
    -h, –help
    Display help text and exit.
     

    BUGS

    It is assumed that none of the randomness sources will block.  

    FILES

    /dev/urandom
    /dev/random  

    Willie
    • Website

    Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.

    Related Posts

    XMAG

    April 30, 2026

    GIT-SUBTREE

    April 30, 2026

    XARGS

    April 30, 2026

    EPOLL_WAIT

    April 30, 2026
    Top Posts

    cloud-run-instances

    March 27, 2026

    CP 1251

    March 13, 2026

    XKEYBOARD-CONFIG

    April 24, 2026

    OCSP

    February 11, 2026
    • Home
    • Contact Us
    • Privacy Policy
    • Terms of Use

    Type above and press Enter to search. Press Esc to cancel.