📜  spotify linux - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:20:12.190000             🧑  作者: Mango

Spotify Linux - Shell-Bash

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.

Installation

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
Basic Usage
Login

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.

Playback Controls

The Spotify client provides various playback controls that can be used from the command line. Here are some basic examples:

  • Play a track
spotify play uri:spotify:track:4gzpq5DPGxSnKTe4SA8HAU
  • Pause playback
spotify pause
  • Resume playback
spotify play
  • Next track
spotify next
  • Previous track
spotify previous
Search for Music

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"
Playlists

You can create, modify, and play playlists from the command line with the Spotify client. Here are some examples of playlist operations:

  • Create a new playlist
spotify create-playlist "My Playlist Name"
  • Add a track to a playlist
spotify add-to-playlist playlist_id uri:spotify:track:4gzpq5DPGxSnKTe4SA8HAU
  • List all playlists
spotify list-playlists
  • Play a playlist
spotify play uri:spotify:playlist:37i9dQZF1DWZd79rJ6a7lp
Conclusion

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.