2 Linux

2.1 Arch

2.2 Debian

2.3 Fedora

2.4 Gentoo

$ emerge xmonad-contrib
# the contrib package depends on xmonad so it gets also installed

if you only want to install xmonad without contrib you could use:
$ emerge xmonad

2.5 Gobo

2.6 NixOS

2.7 Slackware

2.8 Source Mage

2.9 Ubuntu

$ apt-get install libghc6-xmonad-contrib-dev # for all of xmonad core and xmonad-contrib

or else:

$ apt-get install libghc6-xmonad-dev # for just xmonad core

or else:

$ apt-get install xmonad # for just the xmonad binary, without the ability to configure

Note: On Hardy Heron and earlier, the libghc6-x11-dev package was compiled without Xinerama support. This means that if you want multi-monitor support, you will either need to upgrade to Intrepid Ibez or install xmonad (and the Haskell X11 library on which it depends) through one of the #Generic options.

3 BSD

3.1 FreeBSD

3.2 NetBSD

3.3 OpenBSD

xmonad is in the ports tree. To install it,

sudo pkg_add xmonad

4 Mac OS X

5 Generic

5.1 From tarball

5.2 From Hackage

xmonad can be installed from source on any system with an up-to-date Haskell toolchain: