现在应用越来越多,经常要输入密码,有的对密码的健壮性没有要求,有的需要大小写,特殊字符,数字,至少多少位等等,绞尽脑汁想不到好一点的密码。
好在在Linux系统下,我们有很多方式可以生成符号要求的密码。普通方式随机生成。~ openssl rand -base64 15
q7X/UN7SL+yEcIYRxacE使用专业的密码生成工具pwgenpwgen在各个linux平台上都可以通过包管理器安装,在mac上则使用brew安装。yum install -y pwgen #CentOS上安装
brew install pwgen #Mac系统上安装
pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]
-c or --capitalize 至少一个大写字母
-A or --no-capitalize 不要包含大写字母
-n or --numerals 至少包含一个数字
-0 or --no-numerals 不要包含数字
-y or --symbols 至少包含一个特殊字符
-r or --remove-chars= 从密码中移除某些字符
-s or --secure 生成完全随机的密码
-C 已列方式生成密码
-1 不以列方式生成密码
演示~ pwgen -cnyC 15
nu6airievei$X[u Xoh#Ph@ai5eu5ai xaM0yiom[iyiek9 heePh#oo5Aithi4 eix6miebooh$ooS
Iec5ahkeX@ohnoo luphah7Fa
zo5aw
shiuL;iec1Shoo4 phe2oov]uyeiZ'e Faim(ie6pe9XahD aelu5eequ4aiG,e zae|x4mu4Chielu
Ohgh|ohc6uv7vou niosah7eo)feiTi AiSh`ein8doo7Ye joh5eit5Shaz!uJ Ivai0ucahMoF!ah
oop=e0fei1kuTa0 aer9zae4AilaeB~ ungieP9ca7fae't Case^x1osheeSa1 iit8haij\oh7ohS
uo}C4zi7Ohqu/ei eong8eeb6OoGif_ Cee4ooYaikoo$Yo Ihae?thou6apa5b PiejahJeil$ah2X
ohpei3eiL2eiz%e uThue3eezah!z\u xo3waeW6pie:Gh| maW"e+o8ohng'ee thu*H0Gae1Muaco
ong6Ce>ij|ahShi ieV5oov8UNge$ik ooW%ooMiu(daeb1 gah6Ahy}aicei6y xe(b+iKooSh
ahm9ael[ae9UF4o gaichaWee0imai/ Rapo}n5eneecier weeX!aeng4oosed Eeg&am7Nesh0ree
xaeyaexu4Lee@ra chu%a5Shaith1ah uoqu6yair3ooL?i aipae#Ke\d^a4vi eecee2Udoh8ahj]
Iev6roo%ng1weon Ahb4fee>K0eeN}i heeng8pheu-Z~ah at5Jeerei/g{i8i eephaoCha.o%li7
ahf:ush7aingoV0 ShegooV7quuud`u eiw0Noog\aiBei6 lahhoow:aiB2ooY eidai7sah%h2eiM
ku=k0do6thaePhi FoWoose9li&ubei Aip1phie]gh"u-e yieT_uda0heayei iepoe|Paiz3aNga
thah+j0Yeetuz1p Seeroh|wighuc8I oTh[ai2aichemoh ahxaequ4eeyaeV, Ain/oo2Eegiesha
Aos$uboo0ieC8il pi|ma)w1wahie"N bequ1aa7ue~Ch5u ieM}aeweiMie8ai eezie)qu4eeLohv
La2rei^j0raire3 Shochiep7zai=th quae}Nguer9iero wi{k0ailaK4phoo air7eil7aiG\ie>
xen#up4haiR]ooN Inoh]nget3Thee* Bae@h9Lie0ogaew IeY4ohMah:Zohce rae^k5laedohL5U
choh^C7eeHi0ae5 hoNe5sain*eePh8 eb8Fi=phei3ieth UoB4eri>ng9xai7 ieNg%aa*h9eThae
rohP`ei4thi=faL sootaite-a8Uxob ez1ieZ0ohl3Ru>m ieBaevuX{uziTo3 Jilubee'gh9ozi*
密码生成截图
总结
有个密码生成器,以后再也不用担心要想各种密码了。