← 返回命令列表

Linux command

playerctl 命令

文本

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

常用示例

Toggle

playerctl play-pause

Example

playerctl next

Example

playerctl previous

List

playerctl -l

Example

playerctl -p [player_name] [command]

Example

playerctl -a [command]

Example

playerctl metadata -f "Now playing: {{artist}} - {{title}}"

说明

playerctl controls media players that implement the MPRIS D-Bus specification. It provides a unified command-line interface for controlling Spotify, VLC, Firefox, and many other media applications. The tool is commonly used for keyboard shortcuts and scripts to control media playback without focusing the player window.

参数

-p, --player _player_
Target specific player
-a, --all-players
Control all players
-l, --list-all
List available players
-f, --format _format_
Output format template

FAQ

What is the playerctl command used for?

playerctl controls media players that implement the MPRIS D-Bus specification. It provides a unified command-line interface for controlling Spotify, VLC, Firefox, and many other media applications. The tool is commonly used for keyboard shortcuts and scripts to control media playback without focusing the player window.

How do I run a basic playerctl example?

Run `playerctl play-pause` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -p, --player _player_ do in playerctl?

Target specific player