Emacs editor is a text editor that comes with amazing features like customization and extensions. With these features, Emacs can be used for coding purposes with support for programming languages like java, c++, and python.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Software Installation tasks on Linux Systems.
In this context, we shall look into different ways you can install this amazing piece of software in your Linux mint system.
Before proceeding with this Installation procedure, ensure that you use a root or sudo privileged account to perform. Then apply any of the following methods to install emacs editor.
You can use the APT package that comes with the system to install the Emacs editor.
To begin, run the following command to ensure your system repositories are up to date:
$ sudo apt-get update
Next, install Emacs through the following command:
$ sudo apt-get install emacs
You can open the emacs from Utilities in your system or simply typing "emacs" in the terminal.
You can also check the version of your installed emacs through the following command:
$ emacs --version
To remove the emacs editor and its configuration file that is installed through an APT package, run the following command:
$ sudo apt-get purge emacs
Next, Remove all the remaining dependent packages through the following command:
$ sudo apt-get autoremove
Sometimes, packages that come with the system are not the latest version available. If you want the latest version of the software, you need to install it directly from the Personal Package Archives (PPA) of the software.
To install Emac editor in your system, you need to add the Emacs PPA repository in your system:
$ sudo add-apt-repository ppa:kelleyk/emacs
Next, update your system with the following command:
$ sudo apt-get update
Now, you can install the emacs editor with the following command:
$ sudo apt install emacs
In case there is more than one Emacs package in your system, you can specify the version during installation:
$ sudo apt install emacs27
You need the ppa-purge package to remove the PPA-installed software. Install the ppa-purge package by running the following command:
$ sudo apt-get install ppa-purge
Now you can use the ppa-purge command to uninstall software that is installed by the Emacs repository:
$ sudo ppa-purge ppa:kelleyk/emacs
If you prefer a stand-alone independent application, you should use the Emacs snap package to install the Emacs editor.
To begin, You need to install snapd to run the snap packages.
In Linux Mint 20, you need to delete a certain file that prevents the snap package by default. To do that, run the following command:
$ sudo rm /etc/apt/preferences.d/nosnap.pref
Next, update the system and install snapd package:
$ sudo apt update
$ sudo apt install snapd
Now, you can easily run your Emacs snap to install Emacs editor.
$ sudo snap install emacs --classic
To remove the Emacs installed through snap package, run the following command:
$ sudo snap remove emacs
You can install the Emacs flatpak from flathub to install the Emacs editor.
To begin, Add the Flatpak through the following command:
$ sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Now run the following command to run the install Emacs editor:
$ sudo flatpak install flathub org.gnu.emacs
You can remove the Emacs editor installed via flatpak by running the following command in the terminal:
$ sudo flatpak uninstall org.gnu.emacs
This article covers how you can install and uninstall the Emacs editor via different ways. Emacs is a free, open source, extensible and customizable text editor. It is multiplatform and we will find it available for Gnu / Linux, Windows and Mac.