How to open Emacs inside Bash How to open Emacs inside Bash bash bash

How to open Emacs inside Bash


Emacs takes many launch options. The one that you are looking for isemacs -nw. This will open Emacs inside the terminal disregarding the DISPLAY environment variable even if it is set.The long form of this flag is emacs --no-window-system.

More information about Emacs launch options can be found in the manual.


Just type emacs -nw. This won't open an X window.


In the spirit of providing functionality, go to your .profile or .bashrc file located at /home/usr/ and at the bottom add the line:

alias enw='emacs -nw'

Now each time you open a terminal session you just type, for example, enw and you have the Emacs no-window option with three letters :).