Any visual diff in Linux console?

Viewed 55826

Many years ago I used d32 which was available for DOS and Linux.

Is a non-GUI visual diff available for Linux like this one?

Any others than Vim and Emacs (Vim and Emacs are too powerful :-) )

13 Answers

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

Vim comes with vimdiff which works pretty well...

VS Code has beautiful diffing:

code --diff file1.ext file2.ext

(Though it is a GUI.)

Personally I like to use vimdiff. But if you don't know vim that won't be that helpful to you.

Midnight Commander (mc) has built-in diff and a lot more useful functions. Try:

sudo apt install mc

Your title mentions "Linux console" but your question mentions meld, which is a GUI application. It might help answerers if you could clarify this.

In GUI apps, meld is still pretty much the standard. It works well, it's reasonably pretty and intuitive.

If you're really limited to using the console (i.e. text-only) then apart from the diff utilities built into editors like vim and emacs you could also try the original command line utility diff. I find it very useful to use the -y option to display files side-by-side, and there are other options I've used to display "unified" diffs and to precisely set the amount of context around matched differences. If you pipe diff's output into less you can browse with fair convenience.

vimdiff will do what you want. Vim is installed by default on most linux distros, so you probably do not even need to install anything.

Emacs has a built-in visual diff tool: M-x ediff.

Try meld. It's very light and intuitive.

Related