How to Install GNU Emacs in Ubuntu 22.04

GNU Emacs is one of the most mythical text editors that we can find on Linux, so it is convenient to know a little about it. So, in this post, you will learn how to install GNU Emacs on Ubuntu 22.04.

What is GNU Emacs?

According to the project’s website:

An extensible, customizable, free/libre text editor – and more.

It doesn’t need much introduction because it is one of the oldest applications you can find on Linux. However, don’t let this fool you because it has an active development that makes it a widely used application.

Some of its main features are:

  • Full Unicode support for nearly all human scripts. So, you should have no problem using it.
  • Open Source. With a flexible license, you can access the source code and use it in any project and circumstance.
  • Complete built-in documentation. In addition to this, it includes a tutorial designed for beginners.
  • Supports extensions to increase the functionality of the program. To manage them, there is a package manager.

Despite being an application whose fame comes from Linux or Unix systems, you can install it on Windows and macOS. This way, everything is much easier if you come from another system.

Install GNU Emacs on Ubuntu 22.04

Emacs has a great support for Ubuntu, so we have several options to get it on the system.

Each installation method has its pros and cons, so choose the one that best suits you or your user level. All of them work stably.

Method 1: Install GNU Emacs from its official repository

There is a PPA that we can add to get the latest stable version of GNU Emacs on the system without too much trouble. This method is generally recommended for many users.

So, open a terminal and update the whole system:

sudo apt update
sudo apt upgrade

Thereafter, you can add the PPA with the following command

sudo add-apt-repository ppa:kelleyk/emacs

Refresh APT.

sudo apt update

The 28.x series is the most recent series and the one that gives us the latest standard version of the application. To install it, just run.

sudo apt install emacs28

This way, you will already have it installed, and you will be able to execute it from the main menu of the system.

Method 2: Install Emacs using Snap

Snap is a new technology created by Canonical to redefine package distribution on Linux. Being from Canonical, it is seamlessly integrated into Ubuntu, so you can use it by default.

Well, Emacs is also built using this format, and you can install it by simply executing this command in the terminal:

sudo snap install emacs --classic

In the same way, you will get the latest stable version of the application, and you can run it from the main menu.

The Emacs graphical interface

As soon as you run Emacs, you will see this screen

GNU Emacs on Ubuntu
GNU Emacs on Ubuntu

As you can see, it has the classic graphical interface of a classic text editor.

Uninstall GNU Emacs in Ubuntu 22.04

If you would rather not use it anymore, then the wisest thing to do is to remove it from the system. The process depends on the method in which you installed it.

In case you installed Emacs using the PPA, you have to run these commands

sudo apt remove emacs28
sudo ppa-purge ppa:kelleyk/emacs

If you installed using snap, then you just need to run

sudo snap remove emacs

This way, you will no longer have any Emacs on your system.

Conclusion

GNU Emacs is a pretty complete text editor that will help us in daily tasks, but also in more complex or development situations.

I hope you liked the post and share it with all your friends to help us grow.

Leave a Comment

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

Scroll to Top