Another day, another tutorial. On the menu today is the Linux tool spotdl, found here: github.com/spotDL/spotify-downloader.
The setup and usage of this tool is very easy. I will be using it on Windows 11 through Windows Subsystem for Linux (WSL).
Set up WSL
WSL setup is also very easy. Hit the Windows button on your keyboard, type powershell, hit enter and you will open a terminal.
Type, or copy-paste, the below.
wsl --installThis will run the installer. The Linux distribution installed by default is Ubuntu 24.04. You will be asked to input a username and a password; after it is done you will be prompted to restart your PC.
There are a couple of different ways to access your WSL distros: you can type their name in the start menu if you have multiple, or you can type wsl again in the start menu or a Windows Terminal. Note that doing it the latter way through the terminal will not send you to the distribution's file system, but rather the Windows file system.
Now with WSL open, you will first want to update and upgrade the distribution. This is easily done with:
sudo apt update && sudo apt upgrade -y && clearNotice the usage of && to chain separate commands run left to right; the modifier -y pre-emptively confirms that you do in fact want to install these updates; clear clears the terminal, for cleanliness's sake.
fish shell (optional)
An optional step that I highly recommend: install fish shell, found here: fishshell.com.
This shell has the great feature of adaptive and historical command prediction. Here is an example of the historical prediction at work.

To install fish, and set it as the default shell that is run at startup:
sudo apt install fish && chsh $(which fish)Note that when copying these specific commands, the -y modifier is not used, so you will get a (y/n) prompt to confirm install. I did not include it here to portray the difference.
In the future, any time you start WSL, fish will automatically start. For now, type fish and hit enter to enable the fish shell for this session.
spotdl setup
To install spotdl, you will need the pip package manager. There are a number of different versions available; personally I use pipx. Installation:
sudo apt install pipx -y && pipx ensurepathThe above installs pipx and adds it to the path. This is required to run the command globally.
Next, install spotdl:
sudo pipx install spotdl && pipx ensurepathAfter installation you will either have to restart WSL, or source .bashrc / config.fish depending on whether you followed the earlier fish install step.
Without fish:
source .bashrcWithin fish:
source ~/.config/fish/config.fishRunning spotdl
You can now use spotdl.
spotdl will download in the directory that the terminal is pointing to. You will want to point to, or make and point to, your music storage location.
My specific download location is a network attached storage using the Samba protocol. Mounting network drives in WSL/Ubuntu is another can of worms that I will keep for a later date.
Below I give an example using drive letter M for music. This will be different for you; for a fresh music library you will have to make all the folders.
Note that the below directory structure is kind of neurotic: it makes a folder, artists, where multiple artist folders can then be neatly nested, and inside each artist folder an albums folder where individual album releases can then be categorized.
cd /mnt/m/ && mkdir -p /music/artists/artist/albums/album && \
cd /music/artists/artist/albums/albumThe above does the following: cd (change directory) goes to the drive you want to store the music on; mkdir (make directory) creates new folders, with -p required to create multiple folders down a non-existent tree; then we cd into the newly made directories.
It is finally time to download. Copy the Spotify link, then type:
spotdl "SPOTIFYLINK"FYI: this does not download from Spotify but from YouTube.
Disclaimer: this is a tutorial, I am not responsible for what you do with the downloaded music. I personally happily pay for Spotify premium.
My reason for doing this is, firstly, platforms can and will take anything they desire down. Secondly, if my internet goes out I still have access to music. Thirdly, if the zombie infection starts, or WW3 turns the world into Fallout, I can entertain the raiders, and hopefully not be turned into a chewtoy, or sell access to this music for supplies.
I got gifs working, I hope you are proud crapples.
