This answer is meant for users of Unix and Unix-like systems. Users of other operating systems should see the series of questions beginning with Emacs for MS-DOS, which describe where to get non-Unix source and binaries, and how to install Emacs on those systems.
Most GNU/Linux distributions provide pre-built Emacs packages. If Emacs is not installed already, you can install it by running (as root) a command such as ‘dnf install emacs’ (Red Hat and derivatives; use ‘yum’ in older distributions) or ‘apt-get install emacs’ (Debian and derivatives).
If you want to compile Emacs yourself, read the file INSTALL in the source distribution. In brief:
(Replace ‘VERSION’ with the relevant version number, e.g., ‘23.1’.)
tarprograms, which are standard utilities. If your system does not have them, these can also be downloaded from https://ftp.gnu.org.
tar can uncompress and extract in a single-step:
tar -zxvf emacs-VERSION.tar.gz
cd emacs-VERSION ./configure # configure Emacs for your particular system make # use Makefile to build components, then Emacs
make completes successfully, the odds are fairly good that
the build has gone well. (See Problems building Emacs, if you weren’t
Note that ‘make install’ will overwrite /usr/local/bin/emacs and any Emacs Info files that might be in /usr/local/share/info/.