by Devin Yang

建立于: 8年前 ( 更新: 8年前 )

在Linux的~/.bashrc或是MacOS上的~/.bash

在终端机上测试(贴到终端机上运行即可):
env LC_CTYPE=C tr -dc A-Za-z0-9_ < /dev/urandom | head -c "16" | xargs
如果您使用的shell是bash,可以把他添加./bash_profile中如下:
alias gpw='genpasswd'
genpasswd() {
env LC_CTYPE=C tr -dc A-Za-z0-9_ < /dev/urandom | head -c "16" | xargs
}
记得更新一次 source ~/.bash_profile 生效。
然后我们只要输入gpw就能够,生成一组随机的密码罗。
password-generator

Tags: linux mac

Devin Yang

文章内容无法一一说明,如果您有什么不了解处,欢印提问哦:)

No Comment

Post your comment

需要登入才可留言!

类似文章


linux

Raspberry Pi 3 树莓派作业系统安装

这篇文章,分享使用MacOS上的内建命令,进行Raspberry Pi的作业系统安装。 在这个安装过程中关於dd命令,请小心指定您of的参数,即是write output到文件的位置, 指定错了,会毁掉自己的系统哦。

linux, python, colab

如何从我们的Server透过ssh连线到colab?

介绍我写的一支bash,用来透过ssh连线到colab vm内。 一行命令,搞定colab OpenSSH Server。

vpn,cli,macos

我如何在MacOS上用命令行拨VPN

我自己会有用MacOS在命令行拨VPN的需求,在这提供我的别名,设置方式