How To Install jplayer on Ubuntu 18.04

In this tutorial we learn how to install jplayer on Ubuntu 18.04. jplayer is jQuery plugin that plays and controls audio files in a webpage

Introduction

In this tutorial we learn how to install jplayer on Ubuntu 18.04.

What is jplayer

jplayer is:

jPlayer is a jQuery plugin that allows you to play and control audio files in your webpage, create and style an audio player using just HTML and CSS, add sound effects to your jQuery projects, and support more devices using HTML5.

All of this with HTML5 audio support for compliant browsers that allow mp3 or ogg format, while supporting other browsers using mp3 format with no visible Flash.

There are three methods to install jplayer 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 jplayer Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install jplayer

Install jplayer Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install jplayer

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

sudo aptitude -y install jplayer

How To Uninstall jplayer on Ubuntu 18.04

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

sudo apt-get remove jplayer

Uninstall jplayer And Its Dependencies

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

sudo apt-get -y autoremove jplayer

Remove jplayer Configurations and Data

To remove jplayer configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge jplayer

Remove jplayer configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge jplayer

References

Summary

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