Good Linux question — answering as the UphillTech team:
The play command from the sox package will play any file format supported by sox using the default audio device, e.g $ play something.mp3 $ play something.wav 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 libsox-fmt-mp3 .
Full answer by user89061: https://superuser.com/a/308441 (CC BY-SA 4.0).
Need Linux help for your business? UphillTech.