playerctl command not found

In this troubleshooting guide we learn how to fix playerctl command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

playerctl: command not found

or when using sudo you get the following error message

sudo: playerctl: command not found

Solutions to playerctl: command not found

How To Fix playerctl: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu playerctl is provided by playerctl package.

playerctl is:

Playerctl is a command-line utility and library for controlling media players that implement the MPRIS D-Bus Interface Specification. Compatible players include audacious, cmus, mopidy, mpd, mpv, quod libet, rhythmbox, spotify, vlc and xmms2.

Playerctl makes it easy to bind player actions, such as play and pause, to media keys. Playerctl also provides an introspectable library accessible in many popular scripting languages that allows more detailed control like the ability to subscribe to media player events or get metadata such as artist and title for the playing track.

To fix this problem, we can install more using the command below.

sudo apt-get -y install playerctl

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install playerctl.

sudo apt -y install playerctl

Or if you have aptitude installed you can use the following command.

sudo aptitude install playerctl

Summary

In this tutorial we learn how to fix playerctl command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.