How to Open Emacs in Bash

MD Aminul Islam Feb 02, 2024
  1. Install EMACS in Your System
  2. Open EMACS Inside Bash
How to Open Emacs in Bash

This article will show how we will open Emacs inside Bash. We are also going to discuss how to install the Emacs text editor.

Install EMACS in Your System

Suppose you don’t have Emacs in your system. You can easily install it to your system through a single line of code.

Command:

sudo apt-get install emacs

Open EMACS Inside Bash

Now we’re done with the installation part. It’s time to open this text editor.

There are many launch options which you can open Emacs. In this article, we will only open this text editor inside the Linux shell terminal.

Command:

emacs -nw

The -nw means the no window. This is a flag/option that will prevent opening the Emacs text editor without any cross window.

There is a large format of the emacs -nw command.

Command:

emacs --no-window-system

You can use the following command if you need to open this text editor, including a file.

Command:

emacs file.txt -nw

In our command above, we just opened the EMACS text editor with a text file named file.txt.

Note that all the code used in this article is written in Bash. It will only be runnable in the Linux Shell environment.

MD Aminul Islam avatar MD Aminul Islam avatar

Aminul Is an Expert Technical Writer and Full-Stack Developer. He has hands-on working experience on numerous Developer Platforms and SAAS startups. He is highly skilled in numerous Programming languages and Frameworks. He can write professional technical articles like Reviews, Programming, Documentation, SOP, User manual, Whitepaper, etc.

LinkedIn