Compare Files and Folders Graphically in Linux With Meld

How do you compare two similar files to check for differences? The obvious answer is to use the diff command in Linux.

The problem is that not everyone would be comfortable comparing files in Linux terminal. And the diff command output could be confusing for some.

Take this diff command output for example:

Diff Command Complicated Output

There is definitely a learning curve involved here. However, if you are using desktop Linux, you can use GUI applications to easily compare two files for any differences.

There are several GUI diff tools available for Linux to compare files. I am going to highlight my favorite tool Meld in this week’s Linux application highlight.

Meld: Visual Diff and Merge tool for Linux (and Windows)

With Meld, you can compare two files in side by side view. Not only that, you may also modify the files to make changes accordingly. That’s what you would want to do in most situations, right?

File Comparison In Linux With Meld
File Comparison

Meld is also capable of comparing directories and show which files are different. It will also show while files are new or missing.

Directory Comparison In Linux With Meld
Directory Comparison

You may also use Meld for a three-way comparison.

Three Way File Comparison With Meld In Linux
Three Way File Comparison

The graphical side-by-side comparison helps in a number of situations. If you are a developer, you can use it to understand code patches. Meld also supports version control systems like Git, Mercurial, Subversion etc.

Features of Meld

Meld Visual Diff in Linux

The open source Meld tools has the following main features:

  • Perform two and three-way difference comparison
  • Edit files in-place and the difference comparison updates immediately
  • Navigate between differences and conflicts
  • Visualize global and local differences with insertions, changes and conflicts marked accordingly
  • Use regex text filtering to ignore certain differences
  • Syntax highlighting
  • Compare two or three directories for newly added, missing and altered files
  • Exclude some files from comparison
  • Support for popular version control systems like Git, Mercurial, Bazaar and SVN
  • Support for many international languages
  • Open source GPL v2 license
  • Available for Linux as well as Windows

Installing Meld on Linux

Meld is a popular application and it is available in the official repositories of most Linux distributions.

Check your distribution’s software center and see if Meld is available.

Meld In Ubuntu Software Center
Meld In Ubuntu Software Center

Alternatively, you can also use command line package manager of your distribution to install Meld. On Ubuntu, it is available in the Universe repository and can be installed using the apt command:

sudo apt install meld

You may find the source code of Meld on GNOME’s GitLab repository:

Worth it?

I know that most modern open source code editors come with this feature but sometimes you just want a simple interface without the trouble of installing additional add-ons for comparing files. Meld provides you just that.

Do you use some other tools for checking differences between files? Which tool would that be? What’s your experience with Meld, if you ever used it? The comment sections is all yours for sharing your opinion.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries πŸ•΅οΈβ€β™‚οΈ

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world


Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.