Does Ubuntu Come With Emacs?

Emacs can be regarded as the most powerful and flexible text editor in Linux. It is a multi-purpose program that helps you write, edit and compile programs in an Emacs environment. This text editor enables you to have the power of multiple programming languages at your disposal and work simultaneously on the same document.

Emacs uses macros to execute multiple commands in response to a keystroke or mouse event. These macros are created using preprocessor directives that are defined within the Emacs editor itself. In this post, we will tell you that Ubuntu comes with Emacs and further information.

Does Ubuntu Come with Emacs?

Unfortunately, Ubuntu doesn’t come with a preinstalled Emacs text editor, but there are various ways for a user to install it as described below.

Method 1: Install Emacs Via Graphical User Interface (GUI)

There are some main steps you need to follow while installing Emacs via GUI as listed below.

Step 1: Open Ubuntu Software Manager

The first thing users need to do is click on the “Ubuntu software manager” and then click on the “search” icon in the “Explore” tab.

Step 2: Search the Application

After that, you should be able to see the search bar where you need to write the name of the application that you are looking for such as “emac” in this case.

Step 3: Install the Application

After finding the emacs application, you need to click on it, where you should be able to see its additional information and the install button. Now, you need to click on the “Install” button to start the installation of this text editor, as shown below.

Step 4: Verifying Installation

This will take some time, depending on the internet speed, and after that, the emacs text editor will be successfully installed. Later, you can find this application in the “Installed” tab of the Ubuntu software manager, as shown below.

Method 2: Install Emacs Via Terminal

The list of steps needed to install Emacs via terminal is explained below.

Step 1: Open the Terminal

The Emacs text editor can also be installed using a terminal, and for that, you need to first launch it by pressing a shortcut key of “CTRL + ALT + T”.

Step 2: Execute the Installation Command

After that, you need to type the following command to get it installed on the Ubuntu OS.

$ sudo apt install emacs

Or

$ sudo apt-get install emacs

Users can run either of the commands mentioned above, as both will perform the same task.

How to Run the Emacs Text Editor on Ubuntu?

After successfully installing the emacs text editor on Ubuntu, users can run it either by using a graphical interface (GUI) or through the terminal. There are also multiple ways to run the Emacs text editor on Ubuntu, which are mentioned below:

Run the Emacs (GUI) version:

To run it using a GUI, users need to select the application manager. Then, type “emac” in the search bar and click on it as shown.

The second way of running this application is through the terminal, where you need to type:

$ emacs

After that, you will get the following interface:

Run the emacs (terminal) version:

There is one terminal version as well, without the GUI, where you can only run the commands to perform certain tasks. Users can access that version by doing the same thing that they did while accessing the GUI version as below.

Or you can run the following command to access it via the terminal.

$ emacs -nw

The terminal interface of “Emacs” is displayed below.

How to Remove Emacs Text Editor on Ubuntu?

You can remove this application using two different methods, described below:

Remove Emacs via Ubuntu Application Manager

One of the ways to remove emacs on Ubuntu is by going into the installed tab of the Ubuntu application manager. After that, you need to click on the “Uninstall” button in front of the emacs application that will remove this application.

Removing Emacs Text Editor via Terminal

The second way of removing the application is by using a terminal where you need to type the following command.

$ sudo apt remove emacs

Or if you have installed the application via Snap Package Manager, you can remove it by typing this command.

$ sudo snap remove emacs

That’s all from this guide!

Conclusion

It is a fact that Ubuntu does not ship with Emacs by default. Emacs is a powerful and flexible text editor in Ubuntu that helps you write, edit, and compile programs in an Emacs environment. Unfortunately, the emacs text editor isn’t pre-installed in Ubuntu but can easily be installed by multiple methods.

In this post, you know that Emacs does not come with Ubuntu by default.