There are many "random" password generators available on the internet, generating randomness can be tricky and many programs do not generate random characters in a way that ensures strong security. A common recommendation is to use open source security tools where possible, since they allow independent checks on the quality of the methods used.

Note that simply generating a password at random does not ensure the password is a strong password, because it is possible, although highly unlikely, to generate an easily guessed or cracked password. In fact there is no need at all for a password to have been produced by a perfectly random process: it just needs to be sufficiently difficult to guess.

In Linux/Unix, you can use some system tools to help yourself with generating a random password that will fit your needs (/dev/urandom file, tr, xargs, awk, md5, openssl,dd) or you can use some dedicated software (makepasswd, mkpasswd, pwgen, gpw, apg )

Here I want to show some simple examples how to generate a random password

1. Random passwords with system tools

batpig ~ # tr -cd \#_[:alnum:] < /dev/urandom |  fold -w 8 | head -5
su5UjpHO
M1kEPGMX
BlClhsfq
AlUnJz7e
04NyaA8w 

batpig ~ # strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 8 | tr -d '\n'; echo
7bYLOrxA

batpig ~ # egrep -ioam1 '[a-z0-9]{8}' /dev/urandom
H0IICe5p

batpig ~ # date +%s |sha256sum |base64 |head -c 8 ; echo 
ZjNlMjAy

batpig ~ # dd if=/dev/urandom bs=1 count=8 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev
l2p+r52Xblg

batpig ~ # openssl passwd "$RANDOM" | cut -c1-8
tGZBBT76

batpig ~ # gpg --gen-random --armor 1 8
z7+sWwQUlnM=

2. Random passwords with dedicated software

batpig ~ # makepasswd --chars 8 --count 5
L74Fan4m
wN78z9sK
9UG6eEcn
CQJ0ieTw
ftNrRCtj

batpig ~ # mkpasswd
Password: type-Your-Password
a3fa32SVWd13z

batpig ~ # pwgen 8 1
fuN4ooV2 

batpig ~ # gpw 5 8
ionobtio
thstrath
talmiari
ngsoslya
erelerni

batpig ~ # apg -a1 -m8 -x14
)l_e3~(,>L
.,4EX{R51
cU"KvW#<C
~J^LNF$g{7`2
YZ4[)r&i'.0
J8+9<AA]3

And there it is, several methods of getting a random generated password.
Now just create and alias for in in your shell, and you can use it how you like.