How to make Emacs run in command line by default?

Posted on In QA

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.

Eric Ma

Eric is a 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.

One comment

  1. Another options is to have in your .bashrc file:
    alias emacs=”emacs -w”

    That way, when you instinctually go to launch emacs, it will still launch in the terminal.

Leave a Reply

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