I use emacs for coding and other stuffs.

I have now a website which I have to do so many file editing work on ssh connection. It was difficult for me to learn vi or nano.

I like to know if any tools or even lighter emacs available for basic text editing..

  • By ssl, do you mean ssh, https, or something else? Please edit your question to rectify or clarify. – Gilles 'SO- stop being evil' Jul 15 '10 at 18:53
  • sorry, I meant ssh.. – Gopalakrishnan Subramani Jul 15 '10 at 19:04
  • Please edit your question to clarify. – Hello71 Jul 16 '10 at 0:28
  • Title is fixed. – sleske Jul 16 '10 at 1:21

You could run emacs on the remote machine. Emacs runs in a text terminal with only a few minor snags (mainly some key combinations may not be recognized, e.g., C-S-letter may be seen as C-letter; this is due to the terminal emulator). If you frequently connect and disconnect to the remote machine and want to avoid emacs's relatively long startup time, run it under screen (start screen emacs; before you disconnect, type C-a d; when you reconnect, type screen -rd).

If installing emacs on the remote machine is a problem (e.g., on a computer with very little disk space), there are a few small editors with emacs-like keybindings, such as jed, jmacs (a configuration of joe), jove, zile. However they tend not to feel very emacs-like, because most of emacs's power is in its hundreds of lisp packages.

But the option I'd recommend is to keep running emacs locally, and to use some method of editing remote files. Emacs has a native method for editing files over ssh: enter the file name as /mysite.example.com:/name/of/remote/file. This is documented under “remote files” in the emacs 23 manual, and in the separate Tramp manual for older versions of emacs.

  • I do the remote screen + emacs thing myself. I remap screen's ^A command to be ^O, so that normal emacs ^A use isn't changed. Other than that, it works beautifully for me. – Michael H. Jul 15 '10 at 21:38
  • Simplest thing you can do (for a one off or as a short term arrangement: emacs -nw will run emacs in terminal mode. Or you can hack your .emacs file.
  • If you have the bandwidth you can tunnel X over ssh (if permitted by the server). Look at the -X and -Y options to ssh.
  • Finally emacs has support for working with remote files.
  • I'll recommend the ssh "-C" option for data compression if you go the X route. Makes a noticeable improvement on X sessions. – Brian Knoblauch Jul 27 '10 at 15:03

You basically enter C-x C-f within Emacs and type /ssh:username@server.domain:. Emacs usually asks then for your password and tries to set up a remote shell. If this succeeds you can enter your filename. So the complete minibuffer is then: /ssh:username@server.domain:/path/to/your/file. Press RET and edit your files like you do it local.


(I'm assuming you mean an SSH connection)

Emacs is available for editing text on terminals. If it isn't available, perhaps your system administrator can install it, or you can download it and install it in your home directory.

  • so is it the basic apt-get install emacs? I have one but it is UI version.. Are there any emacs for terminal? – Gopalakrishnan Subramani Jul 15 '10 at 18:36
  • @Gopalakrishnan - Yes, I use emacs in a terminal all the time (macosx, fedora, ubuntu). It's probably the case that "apt-get install emacs" will install emacs so you can use it in both X and not-X. – Michael H. Jul 15 '10 at 21:23
  • Also, it's very easy to just compile yourself. I did this on one of our compute servers since the emacs we had there was old and I wanted 23.x.x. Try and d/l the sources. The install instructions are extremely straightforward and included in the README or INSTALL file (pretty much just run make in the correct directory) and voila. – Steve Lianoglou Jul 16 '10 at 13:55

I use TRAMP to edit files remotely using the currently running Emacs, with all your local config etc available.

You just need a (require 'tramp) in your .emacs file, and then use paths of the format :


..to open files on the remote host.

This prompts for passwords when required and then keeps an ssh connection open to the remote host, so opening more files and saving etc all work without any further hassle. Completion and all that works on the remote system too, so tabbing will show lists as usual.

(Skip all the options of installing and running emacs on the remote machine, as you'll have to ensure that your config works properly in a terminal, keep it up-to-date with your current .emacs and so on.)


MicroEmacs looks like a candidate for you. That or the incarnation which Linus is using:

git clone git://git.kernel.org/pub/scm/editors/uemacs/uemacs.git uemacs.git
cd uemacs.git

Compiles pretty well, needs ncurses, roughly 120k binary.


Zile is often installed on servers, which stands for Zile Is Lossy Emacs. A lightweight emacs clone. I often use it for quick sudo zile /etc/$file locally or for any editing tasks on remote hosts. Much faster and lightweight than tramp mode.


Emacs isn't default available on terminals, so for that type of work it might be beneficial to learn vi/vim. Vi is default installed on terminals. Plus you can know both Vim and Emacs, screw the text editor wars.

  • The "vimtutor" command is a good way to get started. – Ed Brannin Jul 16 '10 at 13:36
  • 1
    I agree with the beneficial parts of also learning vi/vim, but your answer is just plain wrong in several ways. – monotux Dec 22 '10 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.