Using shuf to generate random numbers 4 September 2026 / 1 min readlinux The shuf command below generates a random number, starting at 5 and ending at 50. shuf -i 5-50 -n 1 48