×

Emacs is a very useful and feature-rich text editor that can be used across multiple different platforms. Because of its extensive support for writing code in different languages, it is preferred by most of the programmers.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform Software related Installation tasks.

In this context, we shall look into how to install Emacs editor on Ubuntu 20.04.


How to install Emacs Editor in Ubuntu 20.04 ?

To install Emacs editor in Ubuntu 20.04, you can use either of the methods provided below;


1. Installing Emacs Editor via the Snap Package Manager

To use the Snap package manager to install the Emacs editor in Ubuntu 20.04, you will have to perform these steps:


i. Install the Emacs Editor through the Snap Package Manager in Ubuntu 20.04:

The Emacs editor can be installed on Ubuntu 20.04 by using the Snap package manager with the following command:

$ sudo snap install emacs --classic

Once the Emacs editor is successfully installed, you will receive a success message.


ii. Check the Installed Version of Emacs Editor in Ubuntu 20.04:

We can also check the installed version of Emacs editor through this method by running the following command:

$ /snap/bin/emacs --version

This will display the version of the Emacs editor installed on our Ubuntu 20.04 system.


2. Installing Emacs Editor via the PPA Repository

To use the PPA repository to install the Emacs editor in Ubuntu 20.04, you will have to perform these steps:


i. Add the Emacs PPA Repository to your Ubuntu 20.04 System:

First, we will add the Emacs PPA repository to our Ubuntu 20.04 system with the following command:

$ sudo add-apt-repository ppa:kelleyk/emacs

This will add the Emacs PPA repository successfully to your Ubuntu 20.04 system.


ii. Update your Ubuntu 20.04 System:

After adding the Emacs PPA repository to our system, we will update it with the following command for the new changes to take effect.

$ sudo apt-get update

iii. Install the Desired Version of Emacs on your Ubuntu 20.04 System:

Now, we will install the desired version of the Emacs editor on our Ubuntu 20.04 system with the following command:

$ sudo apt install emacs26


iv. Check the Installed Version of Emacs Editor in Ubuntu 20.04:

We can also check the installed version of Emacs editor through this method by running the following command:

$ emacs --version

This will display the version of the Emacs editor installed on our Ubuntu 20.04 system.


v. Search for the Emacs Editor via the Activities Search Bar in Ubuntu 20.04:

We can also look for the Emacs editor by typing its name in the Activities search bar.


How to uninstall Emacs Editor from Ubuntu 20.04 ?

Whenever you are done with using the Emacs editor in Ubuntu 20.04 and you do not need this editor any longer, you can remove it along with its configuration files with the command shown below:

$ sudo apt-get purge emacs26

Now, we can even remove all the dependent packages that were installed along with the Emacs editor by running the following command:

$ sudo apt-get autoremove

This action will remove all its dependent packages from Ubuntu 20.04 system.


[Need urgent assistance in fixing missing packages on Ubuntu Linux Server? We are available to help you today. ]


Conclusion