How to make Emacs run in command line by default?

How to make Emacs run in command line by default? I do not want to open the X window.

You have at least 2 choices.

First choice: use emacs-nox and make it the default:

# yum install emacs-nox
# alternatives --config emacs

and choose emacs-nox.

Second choice: use emacs but with -nw to disable the window system. Invoke emacs by

emacs -nw

You can write a small script ema and put it into your $PATH, e.g. ~/bin/:

#!/bin/env bash
emacs -nw $*

and invoke ema to use emacs each time.

Answered by Eric Z Ma.

Eric Z Ma

Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *