📅  最后修改于: 2023-12-03 15:20:12.190000             🧑  作者: Mango
Spotify is a popular music streaming platform, available on multiple operating systems. This guide will focus on the Spotify Linux client and its usage in the Shell-Bash environment.
The Spotify Linux client can be installed on various Linux distributions, including Ubuntu, Debian, Fedora, and others. The installation process can differ depending on the system, and detailed instructions can be found on the official Spotify website.
To install on Ubuntu, for example, open the terminal and type:
sudo apt-get update
sudo apt-get install spotify-client
Once installed, the Spotify client can be launched from the command line with the command:
spotify
The first time you launch the Spotify client, you will be prompted to log in with your Spotify account credentials. If you don't have an account, you can create one for free on the Spotify website.
The Spotify client provides various playback controls that can be used from the command line. Here are some basic examples:
spotify play uri:spotify:track:4gzpq5DPGxSnKTe4SA8HAU
spotify pause
spotify play
spotify next
spotify previous
You can search for tracks, albums, artists, and playlists from the command line by using the search command followed by your query. For example, to search for tracks by the artist "Daft Punk":
spotify search "artist:Daft Punk"
You can create, modify, and play playlists from the command line with the Spotify client. Here are some examples of playlist operations:
spotify create-playlist "My Playlist Name"
spotify add-to-playlist playlist_id uri:spotify:track:4gzpq5DPGxSnKTe4SA8HAU
spotify list-playlists
spotify play uri:spotify:playlist:37i9dQZF1DWZd79rJ6a7lp
The Spotify Linux client provides a wide range of functionality for Linux users interested in streaming music from the command line. With the basics outlined in this guide, you should be able to start enjoying music on Spotify right away.