Install Shuf On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS
Maintainer: Michael Stone
Email: [email protected] .
Website: https://gnu.org/software/coreutils
Section: utils
Install shuf
-
Debian
apt-get install coreutilsClick to copy -
Ubuntu
apt-get install coreutilsClick to copy -
Alpine OS
apk add coreutilsClick to copy -
Arch Linux
pacman -S coreutilsClick to copy -
Kali Linux
apt-get install coreutilsClick to copy -
CentOS
yum install coreutilsClick to copy -
Fedora
dnf install coreutilsClick to copy -
Raspbian
apt-get install coreutilsClick to copy -
macOS
brew install coreutilsClick to copy
Generate random permutations.
How to use shuf?
Below are few example commands for shuf that you can use in the terminal.
Randomize the order of lines in a file and output the result:shuf filenameClick to copyOnly output the first 5 entries of the result:shuf -n 5 filenameClick to copyWrite the output to another file:shuf filename -o output_filenameClick to copyGenerate random numbers in range:shuf -i 1-10Click to copy
To install the latest version of shuf in your favorite operating system just copy the shuf installation command from above and paste it into terminal. It will download and install the latest version of shuf 2026 package in your OS.




