How to Install Spotify Player on Linux System

Spotify is leading the race of music streaming services in the world along with its counterparts Tidal and Apple Music. It provides you access to over 70 million songs, 2.2 million podcasts, and 4 billion playlists from its web or desktop application. 

The Spotify web player is good for listening to music from your web browser, but sometimes you may inadvertently exit the browser, which will interrupt your music experience.

However, the desktop application is much better than the web version of Spotify, providing you access to control your music from the hotkeys and show the music notification on the tray. You can even sync your local music on the Spotify server or sync it on your other Android, iPhone, or laptop devices.

Is Spotify available for Linux? Yes, and today you will learn how to install Spotify Player on the Ubuntu system, including all other Linux distributions that support Snap.

How to Install Spotify on Linux

Spotify provides a Snap package and custom repositories for the Linux system. It can be easily installed on Ubuntu and other systems that support Snap. Otherwise, you can go for the custom repository and install it using the apt package manager.

Using the Snap Package

A Snap package is a portable, isolated application that contains the application and its required dependencies in a single package. The technology was developed by Canonical and Ubuntu systems ship it by default.

If you run another Linux distribution than Ubuntu, you can install and configure Snap separately on your Linux system using the following commands.

$ sudo apt install snapd           #For Debian/Ubuntu
$ sudo dnf install snapd           #For RHEL/Fedora/AlmaLinux

It will install the snap daemon on your system, including the snap command required to install and manage packages. 

Since Spotify is available for installation from the Snap Store, you can easily install it using the snap command as shown.

$ sudo snap install spotify

Below is the output of the above command.

Installing spotify from snap store
Installing Spotify from the Snap Store

After the installation is successful, you can launch it by searching spotify on the application launcher menu or by executing the following command.

$ snap run spotify

Below is the output of the above command.

Spotify snap package
Spotify Snap package

Using the APT Package Manager

By default, Spotify cannot be installed from the default distribution package manager. However, it provides a custom repository with a GPG key that can be easily added to Debian-based distributions like Ubuntu, Linux Mint, Pop!_OS, etc.

Make sure the curl package is installed on your system or install it using the following command.

$ sudo apt install curl -y

Now, execute the following command to add the Spotify repository to your Debian-based system.

$ echo "deb stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list

Adding the repository is not enough, you also need to add the GPG key to verify the repository.

$ curl -sS | sudo apt-key add - 

Below is the output of the above commands.

Adding repository and GPG key
Adding repository and GPG key

Then you can update your local database and install the Spotify client, as shown below.

$ sudo apt-get update && sudo apt-get install spotify-client

Below is the output of the above command.

Installing Spotify from the APT Package Manager
Installing Spotify from the APT Package Manager

Once the installation is finished without any errors, search for spotify in the application launcher menu or execute the following command.

$ spotify

Below is the output of the above command.

Spotify Debian package
Spotify Debian package

How to Remove Spotify on Linux

This tutorial can not end without showing you how to remove it from your system. If you have followed any one of the above-mentioned methods for installation, then follow the below steps accordingly.

Remove Spotify on Linux installed via Snap

$ sudo snap remove spotify

Remove Spotify on Linux installed via Debian package

$ sudo apt remove spotify-client

Then execute the below commands to remove its repository and GPG key.

$ sudo rm /etc/apt/sources.list.d/spotify.list
$ sudo rm /etc/apt/trusted.gpg.d/spotify-[Replace it]-5E3C45D7B312C643.gpg

Bonus Tip! Install Spotify on Linux Graphically

If you are using the Ubuntu system, you probably know that Snap packages are merged with Ubuntu Software. You will probably find Spotify listed on Ubuntu Software.

Search for software from the application launcher menu to open Ubuntu Software.

Ubuntu software
Ubuntu software

Then click on the top left corner and search for spotify in the input bar.

Searching for spotify
Searching for Spotify

Finally, click on the Install button to start the Spotify installation on your system from the Software Center.

Installing spotify from the software center
Installing Spotify from the software center 

If you look at point number one, you can find that the application is using the Snap package as the source. From there, you can easily switch channels from Spotify Stable (the default) to Candidate or Edge.

I regularly use Spotify to listen to music on my Linux system. Earlier, there were some problems which caused problems to the users. Well, I didn’t feel any problems, except if you were using a snap package, then you could experience lag, but it depends on your system resources. 

Still, if you have something to say or have a question to ask, type it in the comments section.

Leave a Reply