Posted: . At: 9:11 AM. This was 3 years ago. Post ID: 14829
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How to use the Linux command line to generate an absurdly complicated password.


Generating a password with the Linux command line is very easy with data from /dev/urandom. This allows a user to retrieve random data easily. The example below shows a password being generated only using letters and numbers.

┌──[jason@192.168.1.2][~]
└──╼  ╼ $ tr -dc "0-9A-Za-z" < /dev/urandom | head -c 96 ; echo
gOApOMzRqqbmvUjxT7esfJcKW58PxxXqYDwCVvd628OsEa1yyfLADADJQ8YBZFdWZQkCXCRDKCPncSsC20OOjHxklnaxEbJF

This part of the command line only selects upper and lowercase letters and numbers from the input. Then we can print the usable but very complicated password.

Below is another example, this generates a string using only hexadecimal characters.

┌──[jason@192.168.1.2][~]
└──╼  ╼ $ tr -dc "0-9A-Fa-f" < /dev/urandom | head -c 32 ; echo
bB9FF77B926daC93dCeF74E45A3A89FA

This tip would be very useful for generating random passwords for any secure application.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.