Spotify is the most popular streaming music service. While you can listen to it in a web browser, you can also install a desktop client of Spotify on Linux.
Spotify desktop player is better than the web player because you don’t face the risk of accidentally closing the browser and losing Spotify. With the desktop player, you can also use the media keys on your keyboard to change the tracks or pause/play the songs.
The desktop player also gives you some additional features, such as listening to local music in Spotify, using equalizers, and more.
In this quick post, you'll see two methods to install Spotify on Ubuntu:
- Using Snap package (Easy GUI and CLI method)
- Using the deb package from Spotify repository
You can use either of the two.
Method 1: Install Spotify in Ubuntu using Snap Package
Spotify has a Snap package, which means now Spotify can be easily installed directly from the Software Center.
If your system doesn’t have Snap, install it using the command below:
sudo apt-get install snapd
And then you can install Spotify Snap app using this command:
sudo snap install spotify
Once installed, you can find it in the application menu. When you start it for the first time, it will ask you to log in. I found that it was a little unresponsive at the beginning, and I had to close it and open it again after trying to log into Spotify with my Facebook account.
The Spotify snap application integrates fine with the Ubuntu desktop system. It doesn’t add a media control option in the sound menu, but it does support the media keys on your system. Which means you can control it using the play/pause, forward and backward media keys.
Remove Spotify Snap
To uninstall Spotify installed as snap, you can use either the software center or terminal. Open a terminal and enter:
sudo snap remove spotify
Method 2: Install Spotify on Ubuntu, Linux Mint & Debian using the official deb package
This method works with other Ubuntu and Debian based distros as well.
A video version of the installation procedure is on our YouTube channel. Subscribe to our channel for more tutorials.
To install the desktop client of Spotify, open a terminal (Ctrl+Alt+T) and use the following commands:
Make sure that you have curl installed on your Ubuntu system:
sudo apt install curl
Now, you need to configure the repository. To do that, open a terminal and enter:
curl -sS https://download.spotify.com/debian/pubkey_7A3A762FAFD4A51F.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg
The above command will add the Spotify key to your system. This way, your Linux system will trust the software coming from the Spotify repositories.
Now add the Spotify repository to your Sources list.
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
Perfect. Update the package cache and install Spotify:
sudo apt update
sudo apt install spotify-client
Here's a replay of all the above commands:
That’s all you need to do. Next, you can start Spotify by searching for it in Ubuntu Activities overview.
It integrates very well in the Ubuntu environment. Here is what Spotify interface looks like on Ubuntu:
Troubleshooting: Spotify DEB version not opening in Ubuntu
If the deb version of Spotify is crashing upon opening, try launching it from the terminal like this:
spotify --no-zygote
If it works, you can change the spotify.desktop
file so that you can launch it from the menu.
Open the file for editing in the terminal:
sudo nano /usr/share/applications/spotify.desktop
Now change the EXEC value from spotify %U
to spotify %U --no-zygote
.
After this, you can open Spotify without any crash from the system menu and icon.
Remove Spotify deb package
To remove Spotify, first open a terminal and run:
sudo apt remove spotify-client
Wrapping Up
If it interests you, use Spicetify and use some external extensions and themes on your Spotify app.
If Spotify is not available in your country, you can use VPN services to access restricted content in your country, including Spotify, Hulu, Britbox.
I hope this quick post helped you to install the Spotify desktop client on Ubuntu and other Linux distributions.
I think this could be counted as one of the first few things to do after installing Ubuntu.
If you prefer SoundCloud, you can read this tutorial to see how to install SoundCloud on Linux.
How do you find it? Do you use any other service similar to Spotify? Do share your views.