How To Install Cloc?
Maintainer: Jari Aalto
Email: [email protected] .
Website: https://github.com/AlDanial/cloc
Section: devel
Install cloc
-
Debian
apt-get install clocClick to copy -
Ubuntu
apt-get install clocClick to copy -
Alpine OS
apk add clocClick to copy -
Arch Linux
pacman -S clocClick to copy -
Kali Linux
apt-get install clocClick to copy -
Fedora
dnf install clocClick to copy -
Raspbian
apt-get install clocClick to copy -
macOS
brew install clocClick to copy
Count, and compute differences of, lines of source code and comments.
How to use cloc?
Below are few example commands for cloc that you can use in the terminal.
Count all the lines of code in a directory:cloc /path/to/directoryClick to copyCount all the lines of code in a directory, displaying a progress bar during the counting process:cloc --progress=1 /path/to/directoryClick to copyCompare 2 directory structures and count the differences between them:cloc --diff /directory/one /directory/twoClick to copy
To install the latest version of cloc in your favorite operating system just copy the cloc installation command from above and paste it into terminal. It will download and install the latest version of cloc 2026 package in your OS.




