Linux – Install emacs without sudo

centosemacslinux

I have been using vim for years, and I don't really like it.

I'd like to try emacs for a while, but it's not installed on any of the linux servers I use regularly. I don't have root so apt-get install isn't an option (nor can I ask the sysadmin for permission, he would definitely say no).

Is there a binary version of emacs I can install in my home directory? Most of the servers are running CentOS.

Best Answer

If you can compile code, then just download a source distribution of emacs.

Instead of starting with ./configure, use the configure options to tell the build system where you want the files to end up. For example:

./configure --prefix=/home/abhi/emacs --bindir=/home/abhi/bin

will install all of emacs' support files under /home/abhi/emacs, and the emacs executables in /home/abhi/bin. If the latter is in your $PATH, which it usually is, then things should Just Work(sm).

After that you can

make && make install

without worrying about the installation putting files other than in your home directory.

(This is all based on your home directory being /home/abhi, of course. Edit as necessary.)

Related Question