Shell function one-liner to produce a pseudorandom hostname in the style of Windows 7, Windows 8 and Windows 10 e.g. DESKTOP-V1XZZQ3
random_windows_hostname() {
printf "DESKTOP-$(/usr/bin/tr -dc A-Z0-9 </dev/urandom | /usr/bin/head -c 7)"
}
echo "$(random_windows_hostname)" # produces DESKTOP-V1XZZQ3