From ArchWiki
Revision as of 17:30, 1 March 2012 by Rnabioullin (talk | contribs) (Added description, doc package link, external link)
Jump to: navigation, search

Unison is a bidirectional file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

Not only can Unison sync between Windows and Unix ( OSX, Solaris, Linux etc.) systems, it also unrestricted in terms of which system can be the host.

Common uses include syncing configuration files, photos, and other content.


# pacman -S unison

This provides a CLI and GTK+ 1 & 2 frontends.

Offline documentation is available in the unison-doc AUR package.


In order to use Unison, you need to create a profile. You can use the supplied GUI tool or you can manually create a profile in ~/.unison.

If you want to use the GUI configuration, run:

$ unison-gtk2

Otherwise, edit the default config file:

# nano ~/.unison/default.prf

First, define the root of what you want to sync:


Then, define the root of where to sync it to:


Optionally, you can give arguments to SSH:

sshargs=-p 4000

Now you are going to define which directories and files to include in the sync:

# dirs
# files

You can also define which files to ignore:

ignore=Name temp.*
ignore=Name .*~
ignore=Name *.tmp

For further references check the Unison documentation.


Once your profile is set up, you can start syncing:

$ unison <profilename>

or using the GUI tool:


and select the profile. Unison has a nice interface where you can view the progress and changes.

Version Incompatibility

For Unison to function properly, the same version must be installed on all clients. If, for example, one computer has version 2.40 and the other has 2.32, they will not be able to sync with each other. This applies to all computers that share a directory to be synchronized across your machines.

Due to the staggered releases with varying Linux distros, you might be stuck with older versions of Unison, while Arch Linux has the latest upstream version in the Extra repository. There are unofficial PKGBUILDs for versions 2.32 and 2.27 on the AUR that allow users of multiple distros to continue using Unison with their existing systems.

External Links