Install Shuf On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Install Shuf On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

shuf

Generate random permutations.

Maintainer: Michael Stone



Section: utils

Install shuf

  • Debian apt-get install coreutils Click to copy
  • Ubuntu apt-get install coreutils Click to copy
  • Alpine OS apk add coreutils Click to copy
  • Arch Linux pacman -S coreutils Click to copy
  • Kali Linux apt-get install coreutils Click to copy
  • CentOS yum install coreutils Click to copy
  • Fedora dnf install coreutils Click to copy
  • Raspbian apt-get install coreutils Click to copy
  • macOS brew install coreutils Click 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 copy
Only output the first 5 entries of the result:
shuf -n 5 filenameClick to copy
Write the output to another file:
shuf filename -o output_filenameClick to copy
Generate 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 2024 package in your OS.