You can check out the manual entry for diff to easily use it. It compares files line by line and outputs the difference between them. Diff is simple and easy to use, it comes pre-installed on most Linux distributions. I like to start with the original Unix command-line tool that shows you the difference between two computer files. There are several file comparison tools that you can use on Linux, and in this review, we shall look at some of the best terminal based and GUI diff tools you can take advantage of while writing code or other text files. 9 Best Linux File Diff or Comparison Tools This description was born out of a reference to the output of diff, the well known Unix command-line file comparison utility. When you compare two computer files on Linux, the difference between their contents is called a diff. While writing program files or normal text files, programmers and writers sometimes want to know the difference between two files or two versions of the same file.