How To Install mg on Ubuntu 22.04

In this tutorial we learn how to install mg on Ubuntu 22.04. mg is microscopic GNU Emacs-style editor

Introduction

In this tutorial we learn how to install mg on Ubuntu 22.04.

What is mg

mg is:

This program is intended to be a small, fast, and portable editor for people who can’t (or don’t want to) run real Emacs for one reason or another. It is compatible with GNU because there shouldn’t be any reason to learn more than one Emacs flavor.

Packages which provide editors with broadly similar goals include

  • e3;
  • joe;
  • jove and xjove;
  • ng-cjk, ng-cjk-canna and ng-latin;
  • qemacs and qemacs-nox; and
  • zile

There are three methods to install mg on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install mg Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install mg using apt-get by running the following command:

sudo apt-get -y install mg

Install mg Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install mg using apt by running the following command:

sudo apt -y install mg

Install mg Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install mg using aptitude by running the following command:

sudo aptitude -y install mg

How To Uninstall mg on Ubuntu 22.04

To uninstall only the mg package we can use the following command:

sudo apt-get remove mg

Uninstall mg And Its Dependencies

To uninstall mg and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove mg

Remove mg Configurations and Data

To remove mg configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge mg

Remove mg configuration, data, and all of its dependencies

We can use the following command to remove mg configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge mg

References

Summary

In this tutorial we learn how to install mg package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.