Any visual diff in Linux console? [closed]

I'm using vimdiff. Or there is also sdiff.


If you're comfortable with git, you can also use git diff to generate a path for you. It'll usually give you nice colors, page to less, and output the unified diff format by default. It'll work regardless of whether the files are part of a git repository.

git diff -- file.a file.b

If file.a and file.b reside in a git repo and are untracked, you'll need do supply --no-index:

git diff --no-index -- file.a file.b

because git will diff against the index by default.


None of the existing answers here quite fit my use case, but I found cdiff, which is a lovely little piece of software that does exactly what I need:

Term based tool to view colored, incremental diff in a Git/Mercurial/Svn workspace or from stdin, with side by side and auto pager support.

Here's what the side by side mode looks like:

side by side diff output


You can try ColorDiff.