I want to open emacs + an emacs file directly in the terminal, the file in question, how should I go about it?


1 Answer 1


Since you are using putty I assume you want a non-X version of Emacs:

emacs -nw test.txt

will open test.txt in a non-window version of Emacs.

If you need to open test.txt on a particular line and column use:

emacs -nw +5:8 test.txt

This will set your cursor to column 8 on line 5 (or at the end of that line if it is not long enough).

  • 2
    I would perhaps add that in some distros, there's a package called emacs-nox. If you install it, then you can just type emacs-nox file or are even able switch permanently to non-X version via alternatives --config emacs. Or perhaps update-alternatives, that really depends. Commented Nov 4, 2014 at 2:16
  • @MiroslavFranc You are right, and that is the case on my system (Ubuntu 12.04). At this point I was (am) however not even sure this answers the OPs questio.
    – Anthon
    Commented Nov 4, 2014 at 4:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .