How To Install binfmtc on Kali Linux

In this tutorial we learn how to install binfmtc on Kali Linux. binfmtc is Execute C program as script

Introduction

In this tutorial we learn how to install binfmtc on Kali Linux.

What is binfmtc

binfmtc is:

Linux binfmt_misc handler for C, C++, Assembly languages, Pascal, Fortran, Java(GCJ).

Using the binfmt_misc interface, binfmtc allows users to seamlessly execute C source code as if they were scripts.

Includes example utilities realcsh.c, realksh.c, which are for your real C scripting pleasures.

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

Install binfmtc Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install binfmtc

Install binfmtc Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install binfmtc

Install binfmtc Using aptitude

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

sudo aptitude update

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

sudo aptitude -y install binfmtc

How To Uninstall binfmtc on Kali Linux

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

sudo apt-get remove binfmtc

Uninstall binfmtc And Its Dependencies

To uninstall binfmtc and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove binfmtc

Remove binfmtc Configurations and Data

To remove binfmtc configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge binfmtc

Remove binfmtc configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge binfmtc

Dependencies

binfmtc have the following dependencies:

References

Summary

In this tutorial we learn how to install binfmtc package on Kali Linux using different package management tools: apt, apt-get and aptitude.