A collection of methods for obtaining random numbers from Linux

Source: Internet
Author: User

Linux generates a random method

Method of taking 8-digit number

[Email protected] scripts]# echo $RANDOM 12465
[[email protected] scripts]# echo $ ((random+10000000)) 10023190
[Email protected] scripts]# echo $RANDOM | md5sum | Cut-c 1-8ae74cedb
[Email protected] scripts]# uuidgen| md5sum | Cut-c 1-8 Fdfca8ec
[Email protected] scripts]# mkpasswd-l 86zhfj7t>
[[email protected] scripts]# echo ' Date +%s ' | md5sum | Cut-c 1-8f6d58a59

More Random methods

[[email protected] scripts]# echo "' Date +%s ' $RANDOM" | md5sum | Cut-c 1-80daddd89
[email protected] scripts]# OpenSSL rand-base64 4jw/xrw==
[Email protected] scripts]# Head/dev/urandom | Cksum 1181625912 2520
[Email protected] scripts]# Cat/proc/sys/kernel/random/uuid = = uuidgendfdec661-b0b7-48d3-b0db-73d1d7d09e06


This article is from the "Tridewah operation and maintenance work Road" blog, please be sure to keep this source http://cuidehua.blog.51cto.com/5449828/1766008

A collection of methods for obtaining random numbers from Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.