Installing Emacs on BSD

From WikEmacs
Revision as of 21:31, 23 December 2012 by (talk) (Made the page more general; removed sections with no text; lumped all pkgsrc OS's together and wrote a brief section)
Jump to navigation Jump to search

Emacs is available on the BSD variants either in through precompiled binary packages or user-compiled ports. Installation instructions vary according to exact OS.


To install the most recent prebuilt binary package of the (at the time) most recent stable version:

# pkg_add -r emacs

Or use the ports to build from source:

# cd /usr/ports/editors/emacs && make install

Developers may find "Using Emacs as a Development Environment," from the official FreeBSD project documentation, a good starting point. Some of the config tweaks are a bit dated and might need updating. But overall it's a reference


Set PKG_PATH to an appropriate mirror.

# pkg_add -i emacs

pkg_add will prompt you for which version you want—currently, versions 21, 22, and 23 are available.

You can also install from the ports tree; however, "The [OpenBSD] ports tree is meant for advanced users. Everyone is encouraged to use the pre-compiled binary packages."(OpenBSD FAQ, section 15.3)

No premade port or package for Emacs 24 seems to be publicly available currently.

NetBSD, DragonFlyBSD, other pkgsrc systems

On systems using pkgsrc, something like

# cd /usr/pkgsrc/editors/emacs && make install

should work.