pwgen密码生成

本文详细介绍了pwgen密码生成器的安装过程及使用方法,包括如何通过Ubuntu的包管理器apt进行安装,以及pwgen的各种选项说明,如包含大写字母、数字、特殊符号等,帮助用户生成安全的随机密码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装

lwk@qwfys:~$ apt install pwgen
[sudo] password for lwk:       
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  pwgen
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 18.0 kB of archives.
After this operation, 52.2 kB of additional disk space will be used.
Get:1 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 pwgen amd64 2.08-1 [18.0 kB]
Fetched 18.0 kB in 7s (2,629 B/s)
Selecting previously unselected package pwgen.
(Reading database ... 491829 files and directories currently installed.)
Preparing to unpack .../pwgen_2.08-1_amd64.deb ...
Unpacking pwgen (2.08-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up pwgen (2.08-1) ...

用法

lwk@qwfys:~$ pwgen --help
Usage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]

Options supported by pwgen:
  -c or --capitalize
	Include at least one capital letter in the password
  -A or --no-capitalize
	Don't include capital letters in the password
  -n or --numerals
	Include at least one number in the password
  -0 or --no-numerals
	Don't include numbers in the password
  -y or --symbols
	Include at least one special symbol in the password
  -r <chars> or --remove-chars=<chars>
	Remove characters from the set of characters to generate passwords
  -s or --secure
	Generate completely random passwords
  -B or --ambiguous
	Don't include ambiguous characters in the password
  -h or --help
	Print a help message
  -H or --sha1=path/to/file[#seed]
	Use sha1 hash of given file as a (not so) random generator
  -C
	Print the generated passwords in columns
  -1
	Don't print the generated passwords in columns
  -v or --no-vowels
	Do not use any vowels so as to avoid accidental nasty words

用法示例

lwk@qwfys:~$ pwgen 14 1
ooyeiyoi1Shoob
lwk@qwfys:~$ 

转载于:https://my.oschina.net/qwfys200/blog/3039597

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值