Updated: 28 September 2026 · Applies to: AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12

Compare two files or folders to see what changed:

diff file1 file2          # line-by-line differences
diff -u file1 file2       # unified format (easier to read)
diff -r dir1 dir2         # compare folders recursively
cmp file1 file2           # are two (binary) files identical?
md5sum file1 file2        # compare checksums

Graphical tools such as meld or vimdiff show differences side by side on a desktop.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket