How To Install shc on Debian 9

In this tutorial we learn how to install shc on Debian 9. shc is Generic shell script compiler

Introduction

In this tutorial we learn how to install shc on Debian 9.

What is shc

shc is:

shc creates a stripped binary executable from shell script.

shc encodes and encrypts a shell script and generates C source code with the added expiration capability. Its main purpose is to protect your shell scripts from modification or inspection. You can use it if you wish to distribute your scripts but don’t want them to be easily readable by other people or if you need to hide passwords.

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

Install shc Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install shc

Install shc Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install shc

Install shc 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install shc

How To Uninstall shc on Debian 9

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

sudo apt-get remove shc

Uninstall shc And Its Dependencies

To uninstall shc and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove shc

Remove shc Configurations and Data

To remove shc configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge shc

Remove shc configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge shc

Dependencies

shc have the following dependencies:

References

Summary

In this tutorial we learn how to install shc package on Debian 9 using different package management tools: apt, apt-get and aptitude.