← 返回命令列表

Linux command

mpc 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show current song

mpc

Play/pause toggle

mpc toggle

Next track

mpc next

Previous track

mpc prev

Add file to playlist

mpc add [path/to/song.mp3]

Clear playlist

mpc clear

Set volume

mpc volume [80]

Update database

mpc update

Seek within current song

mpc seek [+10]

Toggle repeat mode

mpc repeat

说明

mpc is a command-line client for MPD (Music Player Daemon). It connects to a running MPD instance and controls playback, playlists, volume, and playback state according to commands and arguments passed to it. If no command is given, the current status is printed (same as mpc status).

参数

-f, --format _FORMAT_
Configure song display format using metadata delimiters like %artist%, %album%, %title%, %track%, %time%, %file%.
-h, --host _HOST_
Host to connect to. Use password@host for authentication. An absolute path connects via Unix Domain Socket.
-p, --port _PORT_
Port to connect to (default: MPD_PORT env or 6600).
-q, --quiet, --no-status
Suppress current song status after commands.
-v, --verbose
Verbose output.
--wait
Wait for operation to finish (e.g., database update).

FAQ

What is the mpc command used for?

mpc is a command-line client for MPD (Music Player Daemon). It connects to a running MPD instance and controls playback, playlists, volume, and playback state according to commands and arguments passed to it. If no command is given, the current status is printed (same as mpc status).

How do I run a basic mpc example?

Run `mpc` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f, --format _FORMAT_ do in mpc?

Configure song display format using metadata delimiters like %artist%, %album%, %title%, %track%, %time%, %file%.