How To Install binfmt-support on Ubuntu 18.04

In this tutorial we learn how to install binfmt-support on Ubuntu 18.04. binfmt-support is Support for extra binary formats

Introduction

In this tutorial we learn how to install binfmt-support on Ubuntu 18.04.

What is binfmt-support

binfmt-support is:

The binfmt_misc kernel module, contained in versions 2.1.43 and later of the Linux kernel, allows system administrators to register interpreters for various binary formats based on a magic number or their file extension, and cause the appropriate interpreter to be invoked whenever a matching file is executed. Think of it as a more flexible version of the #! executable interpreter mechanism.

This package provides an ‘update-binfmts’ script with which package maintainers can register interpreters to be used with this module without having to worry about writing their own init.d scripts, and which sysadmins can use for a slightly higher-level interface to this module.

There are three methods to install binfmt-support on Ubuntu 18.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 binfmt-support Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install binfmt-support

Install binfmt-support Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install binfmt-support

Install binfmt-support 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 binfmt-support using aptitude by running the following command:

sudo aptitude -y install binfmt-support

How To Uninstall binfmt-support on Ubuntu 18.04

To uninstall only the binfmt-support package we can use the following command:

sudo apt-get remove binfmt-support

Uninstall binfmt-support And Its Dependencies

To uninstall binfmt-support and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove binfmt-support

Remove binfmt-support Configurations and Data

To remove binfmt-support configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge binfmt-support

Remove binfmt-support configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge binfmt-support

References

Summary

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