FG
💻 Software

Play MP3 or WAV file via the Linux command line

Fresh5 days ago
Mar 15, 2026308218 views
Confidence Score1%
1%

Problem

I would like to make an alarm system backed by a Ubuntu (no graphical interface) box, which plays various announcement and alarm audio tracks (.mp3 or .wav) via the command line. For example: The audio should come from the PC audio jack. I might also wrap it with another socket listener (for example, Ruby Sinatra). How can I do this?

Error Output

$ root> audioplay ./hello.wav

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Play MP3 or WAV file via the Linux command line

Low Risk

The command from the package will play any file format supported by using the default audio device, e.g You may need to install extra packages to gain support for all formats, for example on Ubuntu 11.04 the MP3 support is not available until you install .

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment