<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[onecolumn,letterpaper,11pt]{article}

%===================================================================
\input{../common_latex_packages}
\input{../common_latex_definitions}
\input{../common_latex_help_format}
%===================================================================

\begin{document}

\begin{labcover}
\labtitle{Help Topic: Getting Emacs in Linux}
\vspace{0.1in}
\labdate{Spring 2015}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering, CSAIL}
\labauth{MIT, Cambridge MA 02139}
\labline
\end{labcover}

\wikidoc{file=Help.GetEmacsLinux}
\wikidoc{auth=mikerb@mit.edu}

%====================================================================
\section*{Getting Emacs in Linux}
%====================================================================

Emacs is a very powerful text editor with support for software
development. We will be using it a lot in 2.680. The first step in
using emacs is getting emacs.  In some cases it is already installed
on your machine. This page describes how to find out for sure whether
you have it installed, and if not, how to get it.

%====================================================================
\subsection*{How to tell if Emacs is already installed}

Your machine may already have a version of emacs installed,
with the full path name of /usr/bin/emacs. Verify this:

\vspace{0.15in}
\begin{consoleverb}
 $ which emacs
 /usr/bin/emacs
\end{consoleverb}
\vspace{0.15in}

\noindent
If you get a response like the one above, you're all set. If emacs is
not installed you will get a response like the one below:

\vspace{0.15in}
\begin{consoleverb}
 $ which emacs
 emacs: Command not found
\end{consoleverb}
\vspace{0.15in}

\noindent
If you don't see the love yet, it is most likely because you really
don't have emacs installed. However it is also possible that you
simply don't have \var{/usr/bin/} in your shell path.
To rule this out, try the following:

\vspace{0.15in}
\begin{consoleverb}
 $ cd /usr/bin
 $ which ./emacs
 ./emacs
\end{consoleverb}
\vspace{0.15in}

\noindent 
If you see the above, it is simply a matter of adding \var{/usr/bin/}
to your shell path. Do this now, or see the help topic on augmenting
your shell path:

\urlxx{http://oceanai.mit.edu/ivpman/help/help-add-shellpath}

%====================================================================
\subsection*{Getting Emacs in Linux}

If you are running linux you very likely have access to a package manager
such as apt-get and already know how to use it to some degree. To get emacs, 
you will need root priveleges. Do the following, and enter your normal
login password when or if prompted:

\vspace{0.15in}
\begin{consoleverb}
 $ sudo apt-get install emacs
\end{consoleverb}
\vspace{0.15in}

\noindent
See the discussion above on how to confirm whether emacs has been 
successfully installed, and adjust your shell path if need be.

\end{document}
</pre></body></html>