Saturday, April 20, 2024
HomeTutorialsHow To Install and Configure Spotify on Linux Distributions

How To Install and Configure Spotify on Linux Distributions

Spotify is a platform-independent application for music and audio streaming. All music and podcast enthusiasts have already heard the name of Spotify. You can use Spotify on Android, iOS, Windows, Linux, and macOS. Although there are other music streaming applications on the Internet, the reason you need to use Spotify is more compatible and user-friendly. Moreover, if you are a professional audio broadcaster, you can use Spotify to publish your own podcast.

Spotify is interesting to use because it supports offline listening, and you can also watch Spotify videos and radio. If you need to listen to audio in a more individual way, it also offers you the use of the built-in equalizer to adjust the sound effect.

Spotify on Linux


Spotify officially provides a package for only Debian and Ubuntu systems, but developers have built versions of Spotify for other Linux distributions. It is available for Debian, Arch, Red Hat, and other Linux distributions. As Spotify is written in Python, Java, and C++, so installing and using Spotify in any Linux system is hassle-free and straightforward. In this post, we will see how to install and use Spotify on a Linux system.

1. Install Spotify on Ubuntu/Debian


Installing Spotify on a Debian-based distribution is easy. There are both Snap, Apt, and GUI methods available for installing Spotify on a Debian/Ubuntu Linux system.

Method 1: Install Spotify on Ubuntu via APT


To install Spotify on Ubuntu via the aptitude commands, you need to add the Spotify public key to your system’s repository. First, run the following commands given below to install the cURL tool on your system.

sudo apt update
sudo apt install curl

Now, run the cURL command and the echo command given below to add the key to your Linux system.

install spotify on Ubuntu

curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add -
echo "deb https://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list

Finally, run the following aptitude command given below with root access to install Spotify on your Ubuntu system.

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

When the installation finishes, you can now run Spotify on your system by just typing ‘Spotify’ on the terminal shell.

$ spotify

Method 2: Install Spotify On Ubuntu Via Snap


Spotify is also available for Debian/Ubuntu Linux distributions on the Snap store. If you have issues installing Spotify through the aptitude commands, you can first install the Snap daemon on the system, then install Spotify via Snap.

Run the following command given below with root access to install the Snap daemon on your Ubuntu system.

$ sudo apt install snapd

Ultimately, run the following Snap command given below with root access to install Spotify on your Ubuntu/Debian system.

snap install spotify

Method 3: Install Spotify On Ubuntu Via GUI


The graphical user interface (GUI) method is one of the oldest yet very quick methods to install any packages on a system. If you’re a Ubuntu user, you can open the ‘Ubuntu Software’ store to find the Spotify application on the store. When the store opens, search for Spotify on the search bar and hit the enter button to see all the available Spotify clients for Ubuntu.

Spotify on ubuntu Linux GUI

From the Spotify client’s list, select the official Spotify client tool and go to the installation page. On this page, click on the ‘Install’ button and proceed with the root password.

2. Install Spotify on Arch Linux


Installing Spotify on an Arch-based Linux system is now more versatile. There are CLI, GUI, Snap, and Flatpak methods available for installing Spotify on an Arch Linux. Here, I’m using a Manjaro KDE Arch Linux to demonstrate the method of installing Spotify on Arch-based Linux systems.

Method 1: Install Spotify on Arch via Pamac


The Pamac command is officially used to install and manage packages on the Arch system, and it supports the AUR Arch Linux repository. However, as the Pamac is a GUI tool of the robust CLI Pacman command for Arch Linux, you might need to install the Pamac tool for the first time on your system. You can run the following commands given below on your system to install the Yaourt tool, which will later lead us to use the Pamac command.

$ sudo pacman -S --needed base-devel git wget yajl
$ cd /tmp
$ git clone https://aur.archlinux.org/package-query.git
$ cd package-query/
$ makepkg -si && cd /tmp/
$ git clone https://aur.archlinux.org/yaourt.git
$ cd yaourt/
$ makepkg -si

After installing Yaourt successfully, you may now go ahead to install the Pamac AUR repository.

$ yaourt -S pamac-aur

Finally, installing the Spotify directory on your Linux system can use the following command Pamac command on your terminal shell with the root password.

pamac build spotify

Method 2: Install Spotify on Arch via Snap


As Snap has been using widely on all major Linux distributions, you can also install Spotify on your Arch-based systems. First, you need to run the following Pacman commands on the terminal shell to install the Snap daemon if they are not already installed. The following commands will install Snapd, add a symbolic link and enable the daemon on your system.

sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

Finally, run the following Snap command given below with root access to install Spotify on your Arch Linux system.

sudo snap install spotify

Method 3: Install Spotify on Arch via Flatpak


The Flatpak is one of the best and convenient alternative ways to install a package on a Linux system. If you have issues with Pacman and Snap commands, you can use the Flatpak method for getting Spotify on your Arch-based devices.

First, run the following Pamac command on the terminal shell to get the Faltpak tool on your system.

pamac install flatpak

Now, run the Flatpak command given below on the shell to install the Spotify application on your Arch Linux system.

flatpak install spotify

Method 4: Install Spotify on Arch via Git


This method is going to tell us how we can install Spotify on An Arch-based Linux system through the source code. Here, we will use Git to get the Spotify files on our system. First, run the following Pacman command given below with root privilege to get Git on the machine.

sudo pacman -S git

Now, clone the Spotify Git repository on your system, and make a new directory to store them. Then browse the directory and run the makepkg command to build the package.

$ git clone https://aur.archlinux.org/spotify.git
$ cd spotify/
$ makepkg -s
$ ls *.xz
spotify-1.0.92.390-1-x86_64.pkg.tar.xz

Finally, run the Pacman command given below on the shell to install the Spotify application on your Arch Linux system.

$ sudo pacman -U --noconfirm spotify-1.0.92.390-1-x86_64.pkg.tar.xz

Method 5: Install Spotify on Arch via GUI


The Arch software management tool surprises me more than any other distribution; the software store stores almost every necessary application that one might need to install to run a setup smoothly. You can find the Spotify daemon application, which also acts as a client tool on the Arch software store.

Spotifyd install on Manjaro

To install the Spotify client on your Arch system, you need to open the package manager tool, and then on the search bar, you need to search for ‘Spotify’. When Spotify appears on the search list, click on Spotifyd to open the installation page.

You can now install, manage dependencies, and see package files from the package manager tool. To install, just click on the ‘Install’ button placed at the top-right corner and proceed with the root password.

3. Install Shopify on Fedora Linux


If you’re a Fedora workstation user, this step is totally for you. Here, we will see two methods of installing Spotify on the Fedora system. If you’re using an upgraded Fedora system, you may also replace the DNF with the RPM command if the DNF does not work.

Method 1: Install Spotify on Fedora and Red Hat via RPM Fusion


The RPM fusion packages work to compile a package that usually is not found in the official repository. Using RPM fusion is totally safe and secure. In this method, first, we will need to install the RPM fusion packages on our system. You can run the following DNF commands given below to install the free and non-free versions of RPM fusion on your system.

# dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

non free RPM fusion download for fedora

Finally, run the following commands given below chronologically on your terminal shell to install the Spotify client package on your Fedora Linux system.

spotify on fedora

$ sudo dnf install lpf-spotify-client
$ lpf approve spotify-client
$ sudo -u pkg-build lpf build spotify-client
$ sudo dnf install /var/lib/lpf/rpms/spotify-client/spotify-client-*.rpm

Method 2: Install Spotify on Fedora and Red Hat via Snap


Till now, we have seen that using the Snap method for installing Spotify on various Linux distributions is a common method. As Spotify still does not have any official client application for Fedora and Red Hat Linux, you can rely on the Snap methods of installing Spotify on Red Hat and Fedora Linux.

If you do not have the Snap daemon installed on your system, please execute the commands lines according to your distribution.

Install Snapd on Fedora

sudo dnf install epel-release
sudo dnf upgrade
sudo dnf install snapd
$ sudo ln -s /var/lib/snapd/snap /snap

Install Snapd on Red Hat Linux

sudo yum install snapd
$ sudo systemctl enable --now snapd.socket
$ sudo ln -s /var/lib/snapd/snap /snap

Finally, run the following Snap command given below with root access to install Spotify on your Fedora/Red Hat Linux system.

$ snap install spotify

Method 3: Install Spotify on Fedora via Flatpak


Once you get used to Flatpak, you will find that using Flatpak is more fun and easy than other methods to install packages on Linux. However, you can use the Flatpak tool for installing Spotify on your Fedora system. First, run the following commands on the terminal shell to install the Flatpak tool.

sudo dnf install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

When the Flatpak installation finishes, you can now run the Flatpak command given below to install the Spotify tool on your Fedora system.

Install Spotify on Fedora via Flatpak

sudo flatpak install flathub com.spotify.Client

When the installation ends, now run the following command to run the Spotify tool.

flatpak run com.spotify.Client

Get Started with Spotify on Linux


Using Spotify is easy and hassle-free. After installing Spotify successfully on the Linux system, we can now open Spotify by typing the package name on the terminal shell. You can also use the traditional GUI method to open it on your system. When Spotify opens, it will ask for logging in to your Spotify account. After signing in, you can now explore the music and audio section to enjoy your favorite music and tunes.

login to continue on spotify on linux

Ending Words


As Spotify is still not officially available for all Linux systems, using Snap, Flatpak, and source code methods to install Spotify is pretty safe and secure. In the entire post, I’ve described the methods of installing and getting started with Spotify on various Linux systems. If you find this post useful and technical, please share it with your friends and the Linux community. You can also write down your opinions regarding this post in the comment section.

Mehedi Hasan
Mehedi Hasan
Mehedi Hasan is a passionate enthusiast for technology. He admires all things tech and loves to help others understand the fundamentals of Linux, servers, networking, and computer security in an understandable way without overwhelming beginners. His articles are carefully crafted with this goal in mind - making complex topics more accessible.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

You May Like It!

Trending Now