Chapter 2. A Tour of Mercurial: The Basics

Installing Mercurial on Your System

Prebuilt binary packages of Mercurial are available for every popular operating system. These make it easy to start using Mercurial on your computer immediately.

Windows

The best version of Mercurial for Windows is TortoiseHg, which can be found at http://bitbucket.org/tortoisehg/stable/wiki/Home. This package has no external dependencies; it just works. It provides both command-line and graphical user interfaces.

Mac OS X

Lee Cantey publishes an installer of Mercurial for Mac OS X at http://mercurial.berkwood.com.

Linux

Because each Linux distribution has its own packaging tools, policies, and rate of development, it’s difficult to give a comprehensive set of instructions on how to install Mercurial binaries. The version of Mercurial that you will end up with can vary depending on how active the person is who maintains the package for your distribution.

To keep things simple, I will focus on installing Mercurial from the command line under the most popular Linux distributions. Most of these distributions provide graphical package managers that will let you install Mercurial with a single click; the package name to look for is mercurial.

  • Ubuntu and Debian:

    apt-get install mercurial
  • Fedora:

    yum install mercurial
  • OpenSUSE:

    zypper install mercurial
  • Gentoo:

    emerge mercurial

Solaris

SunFreeWare, at http://www.sunfreeware.com, provides prebuilt packages of Mercurial.

Get Mercurial: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.