7.1 How do I install Emacs?

This answer is meant for users of Unix and Unix-like systems. Users of other operating systems should see See Where can I get Emacs for macOS, MS Windows, etc?.

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: