How To Install Cmp?

How To Install Cmp?

cmp

Compare two files.

Maintainer: Santiago Vila



Section: utils

Install cmp

  • Debian apt-get install diffutils Click to copy
  • Ubuntu apt-get install diffutils Click to copy
  • Alpine OS apk add diffutils Click to copy
  • Arch Linux pacman -S diffutils Click to copy
  • Kali Linux apt-get install diffutils Click to copy
  • CentOS yum install diffutils Click to copy
  • Fedora dnf install diffutils Click to copy
  • Raspbian apt-get install diffutils Click to copy
  • macOS brew install diffutils Click to copy

Compare two files.

How to use cmp?

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

Find the byte number and line number of the first difference between the files:
cmp file1 file2Click to copy
Find the byte number and differing bytes of every difference:
cmp -l file1 file2Click to copy
To install the latest version of cmp in your favorite operating system just copy the cmp installation command from above and paste it into terminal. It will download and install the latest version of cmp 2026 package in your OS.