Spotify is without a doubt the most popular audio streaming platform right now. Within this new tutorial today we will talk about how to install Spotify on Linux if you do not like the Web player accessible through a simple browser.
How to install Spotify on Ubuntu and Debian
All Ubuntu / Debian based Linux distributions have direct support from Spotify, so it is possible to install the program from the software center. However, on some Linux distros not based on Debian you need to install the desktop app in a different way. To make it work you have to work from the terminal.
Before you can install the Spotify client, you need to add a repo key that allows the computer to recognize the reliability of the repository from which you are installing the program. To do this, use the command sudo apt-key adv –keyserver hkp: //keyserver.ubuntu.com: 80 –recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C198860DF731E45CE24F27EEEB1450EFDC8610341D9410.
Once the key has been correctly added, the software source can be inserted into the source file using the echo deb command http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list. Once this is done, the computer will recognize the Spotify server as a secure repository.
The next step to do is to update the software sources. In this way, the PC will see the Spotify client in the package manager. Use the sudo apt-get update command always inside the terminal. At this point, you can proceed with installing the app on the distribution using the sudo apt-get install spotify-client command.
How to install Spotify on other Linux distributions
A few years ago, if you didn't have a distro based on Ubuntu or Debian, the chances of using Spotify were pretty low. This is now a distant memory thanks to the Snap and Flatpak packages. Now Spotify can be installed on virtually any distro.
To get started, you need to install Flatpak. In this case, follow our guide dedicated to the topic. Once Flatpak is 100% working, you can install Spotify using the Gnome terminal or software.
If you choose to operate from the terminal, use the flatpak install –from command https://s3.amazonaws.com/alexlarsson/spotify-repo/spotify.flatpakref making sure not to run it with sudo. After installing the Flatpak package, run the app with flatpak run com.spotify.Client.
If you don't want to use the terminal, simply download the .flatpakref file and use the Gnome software. So, open your default browser, connect to the Web page dedicated to Spotify on the site Flathub and press the button Install to proceed with the download.
Once the flatpakref file is downloaded, open the file manager and go to the download folder. From here, click on spotify.flatpakrefd which will automatically open the Gnome software. Inside the window that appears you will see the Spotify icon with a brief description of the app. To proceed with the installation, just click on the Install button.
Another good news is that the updates will be downloaded and installed automatically through the software center, so you will not have to download the spotify.flatpakref file again to update the program.