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

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

wc

Count words, bytes, or lines.

Maintainer: Michael Stone



Section: utils

Install wc

  • 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

Count words, bytes, or lines.

How to use wc?

Below are few example commands for wc that you can use in the terminal.

Count lines in file:
wc -l fileClick to copy
Count words in file:
wc -w fileClick to copy
Count characters (bytes) in file:
wc -c fileClick to copy
Count characters in file (taking multi-byte character sets into account):
wc -m fileClick to copy
To install the latest version of wc in your favorite operating system just copy the wc installation command from above and paste it into terminal. It will download and install the latest version of wc 2026 package in your OS.