How to play mp3 files from the command line?

Solution 1:

For wav you can use aplay. For mp3 you can use mpg123.

Solution 2:

If you already have ffmpeg installed (you should have ffmpeg installed default with ubuntu), try:

ffplay example.mp3