How To Install libjs-highlight.js on Kali Linux

In this tutorial we learn how to install libjs-highlight.js on Kali Linux. libjs-highlight.js is JavaScript library for syntax highlighting

Introduction

In this tutorial we learn how to install libjs-highlight.js on Kali Linux.

What is libjs-highlight.js

libjs-highlight.js is:

Highlight.js is a JavaScript library which automatically detects the language of code blocks in a web page, and provides syntax highlighting for them. The library supports more than fifty languages and is bundled with more than twenty style themes.

This package contains the library highlight.js usable in a web browser.

There are three methods to install libjs-highlight.js 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 libjs-highlight.js Using apt-get

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

sudo apt-get update

After updating apt database, We can install libjs-highlight.js using apt-get by running the following command:

sudo apt-get -y install libjs-highlight.js

Install libjs-highlight.js Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libjs-highlight.js using apt by running the following command:

sudo apt -y install libjs-highlight.js

Install libjs-highlight.js 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 libjs-highlight.js using aptitude by running the following command:

sudo aptitude -y install libjs-highlight.js

How To Uninstall libjs-highlight.js on Kali Linux

To uninstall only the libjs-highlight.js package we can use the following command:

sudo apt-get remove libjs-highlight.js

Uninstall libjs-highlight.js And Its Dependencies

To uninstall libjs-highlight.js and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove libjs-highlight.js

Remove libjs-highlight.js Configurations and Data

To remove libjs-highlight.js configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge libjs-highlight.js

Remove libjs-highlight.js configuration, data, and all of its dependencies

We can use the following command to remove libjs-highlight.js configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libjs-highlight.js

Dependencies

libjs-highlight.js have the following dependencies:

References

Summary

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