MPD

Overview

MPD, short for Music Player Daemon is a music player, that runs in the background. It is cross-platform, however mostly used on linux. It plays audio files, organizes playlists and maintains a music database. To interact with MPD, a client application is needed. There are various options, web-based, as well as gui or terminal based applications.

Setup

First, install the mpd package, using the package manager of your distribution:

sudo apt install mpd

The easiest way is to start MPD using its command:

mpd

Since MPD is a daemon, it will detatch itself from the terminal and run in the background. To stop MPD now, you can use:

pkill mpd

However, usually MPD is started using a service manager like systemd:

sudo systemctl start mpd

And to stop MPD use:

sudo systemctl stop mpd

Configuration

To actually use MPD, the daemon needs to be configured. This us done via the /etc/mpd.conf file.

Client

Since MPD is a daemon, you shouldn't interact directly with it, but rather use a client, such as mpc. mpc needs to be installed additionally with mpc.

sudo apt install mpc

Then copy your music files into /var/lib/mpd/music/. After the files are added, run:

mpc update
mpc shuffle
mpc play