一、
pwgen [ OPTION ] [ pw_length ] [ num_pw ]
(1)OPTION
-c 选项指定生成的密码包含大小写字母,
-c, --capitalize
Include at least one capital letter in the password. This is the default if the standard output is a tty device.
-n 选项指定生成的密码包含数字,
-n, --numerals
Include at least one number in the password. This is the default if the standard output is a tty device.
-y 选项指定生成的密码包含特殊字符。
-y, --symbols
Include at least one special character in the password.
可以根据需要调整选项和密码长度。
(2)指定生产的密码数量
#密码长度为6,随机生成2个密码
❯ pwgen -c -n -y 6 2 Xo[r2w Bu.S3O
(3)不指定密码数量
#指定密码长度为6位
❯ pwgen -c -n -y 6 aeY>i5 eL.o3o uu~Th4 Eif-a3 de%o7A Ex[oy1 Ia|vu4 Pi.aw8 Ga,d9o ie;H8F Roo\r1 fe<oT0 Mee&f7 Be_ke6 Mo1ia< Ahc_e8 gei%W4 Id/u8z Pha>e5 Ak9Ou| Az{ie4 Che.o0 ohB!i8 Jee!v0 xei~V9 ahF;o3 Lu4ku* re=P5u wah#S9 pe2Li: io{v7E Ur+ei7 Uk5ra% Aht!u2 aN?ei2 ux&a1I eS$u7V Zo+Wa8 ni"X3g mai!T9 nu%e3F mae\G3 ni]e4U Gae}N4 foo[F0 Rie{y4 Yoh%V1 eeH?o2 Ie]B2o dai=P5 Iey>e6 xei+T9 re`e2C do<Th1 se<Ph9 fi(e0Z Wee&l6 aeL^i1 Eu<r5f me'u2I Chu)j4 Pah?M5 iW|oh4 Ee,m9l ii$N1u aP9ei; Ais\u2 Pee*z7 wa?m0C Ang,e7 Fae"m1 oH>ai7 ua6Fo/ Ba:ga1 xa{Th0 Aed\a7 Ki5ni[ ei#Z5u iH&eo1 xa?G9o Yi;og9 Ze/ig8 Ahm@a3 Aud+o9 aC>ae7 Mei>y3 uo(Va5 Au?ng4 ta\Qu6 uu<n8N eNg)u5 qua@B8 Ed]ee8 Eu]ph7 iM@ei2 Pi:i1i aVo*o3 Noh+p7 Ne-u7i Shi(v5 eo$y5I Yae!f0 de"aK9 ai9Oa< Cu8de,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