Play MP3 Files With mpg123
Decode and play MP3 audio straight from the shell.
Run mpg123 song.mp3 to play the file; press Ctrl+C to stop.
01Command
Command
$ mpg123 song.mp302What it does
mpg123 is a long-standing command-line MP3 decoder and player. It can play a single file, an entire playlist or a directory glob, and -C enables interactive keyboard controls. It is useful in scripts and on headless machines.
03Risk
!Warning: It plays to the default audio device; if none exists it exits with an error instead of failing gracefully.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- mpg123Evidence: Official mpg123 page with playback and decoding options.
- Homebrew formula: mpg123Evidence: Installs mpg123, a command-line MP3 player.
Last verified: 2026-09-20 · Category: Media
06Related solutions
Play Music in the Terminal With cmus
Browse and play local audio files with a keyboard-driven ncurses player.
ASCII Aquarium With asciiquarium
Run a calm fish-tank animation made of plain text characters.
Print Images in the Terminal With catimg
Render a JPEG or PNG as colored blocks inside the terminal.