Use rolldice for full RPG features like modifiers and totals. This is the easiest way to roll a die in the terminal. Use shuf for quick, offline random rolls, and finally, you can use $RANDOM in bash ...