There are many tools to play mp3 on the terminal command line, and some can even generate playlists. Only command-line heavy users have this requirement, let's take a look at these tools.
Sox
Sox (sound eXchange) is a Swiss Army knife that operates audio files, which can play, convert, and add effects.
To install Sox on Ubuntu:
$ sudo apt-get Install Sox Libsox-fmt-all
The Libsox-fmt-all contains decoders for MP3 and other formats.
Play Music:
$ play Crystals.mp3
Moc
The Moc (Music on Console) player is developed specifically for the terminal command line, which allows the user to select files to play through a text-based file browser.
Install MOC:
$ sudo apt-get install MOC
To open the player:
$ MOCP
Select the file to play, passing play:
The MOC player can use shortcut keys to control playback, s stop, p pause, left and right arrow backwards and fast forward.
VLC player
VLC provides a command-line tool for playing audio.
Installing VLC:
$ sudo apt-get install Vlc-nox
Start VLC:
$ vlc-i ncurses
H view Help, which lists the shortcut keys for all playback controls.
CMUs
CMUs is also a command-line based player.
Install CMUs:
$ sudo apt-get install CMUs
Start:
$ cmus
Press 5 to open the file browser, see more actions: Https://github.com/cmus/cmus/blob/master/Doc/cmus-tutorial.txt
Ubuntu Terminal command line play music (mp3)