Created
October 4, 2021 17:15
-
-
Save Ghostbird/2d9709b3ea782cf0620d8fdbfe55fb5b to your computer and use it in GitHub Desktop.
Generate a random password, show it, and add it to the CTLR+V clipboard with this bash one-liner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dd if=/dev/random bs=1 count=${1:-16} 2> /dev/null | base64 | tee >(xclip -selection clip-board); |
Note: If you prefer the GNU/Linux clipboard on middle mouse click, you can remove the -selection clip-board
part.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I recommend adding this to bash aliases: