21

Just like using emacs on putty. I just transfered to Ubuntu from windows.

30

To run emacs in the Terminal without a GUI (i.e., without it creating a graphical window for itself), use:

emacs -nw

The -nw flag stands for "no window."

6

The command-line emacs is installed along with the GUI. To run it, use the -nw option. An explanation from man emacs:

-nw, --no-window-system
Tell Emacs not to use its special interface to X. If you use
this switch when invoking Emacs from an xterm(1) window, display
is done in that window.

So run the following command to use emacs from the command-line:

emacs -nw

If you don't want to have to type emacs -nw, you could create an alias. Put the following line in your ~/.bashrc or ~/.bash_aliases:

alias emacs="emacs -nw"

You can add this alias in one line by using I/O Redirection:

echo alias emacs="emacs -nw" >> ~/.bashrc

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.