Best of Linux

Best Command Line Music Players for Linux

This article will list various free and open source command line music players available for Linux. These command line applications are mainly navigated through arrow keys and keyboard shortcuts and they are pretty useful if you are using a headless operating system based on Linux.

Mpg123

Mpg123 is a command line music player and audio decoder for Linux. It can play and decode mp3 files in real time, shuffle songs, downmix music and has built-in support for an equalizer.

To install mpg123 in Ubuntu, use the following command:

$ sudo apt install mpg123

You can install Mpg123 in other Linux distributions form the package manager or you can download it from here.

To play all mp3 files in a folder using Mpg123, run a command in the following format:

$ mpg123 “$HOME/Downloads/music/*

To view all command line options, run the following commands:

$ mpg123 --help
$ man mpg123

Ogg123

Ogg123 works similar to Mpg123, but only for “.ogg” files. Its feature set is also identical to Mpg123.

To install Ogg123 in Ubuntu, run the command below:

$ sudo apt install vorbis-tools

You can install Ogg123 in other Linux distributions by searching for “vorbis-tools” in package manage or you can compile it from source.

To play all ogg files in a folder using Ogg123, run a command in the following format:

$ ogg123 “$HOME/Downloads/music/ogg/*

To view all command line options, run the following commands:

$ ogg123 --help
$ man ogg123

MOC

MOC or “Music On Console” is a free and open source command line music player for Linux. It allows you to play music and control playback using an interactive keyboard-driven console based layout. It works like a dual pane file manager, all you have to do is navigate to the folder where your music is stored and hit the <Enter> key to start playback. Other features of MOC include customizable color schemes, an equalizer, and user defined keyboard shortcuts.

To install MOC in Ubuntu, you can use the command mentioned below:

$ sudo apt install moc moc-ffmpeg-plugin

You can install MOC music player in other Linux distributions by searching for it in the package manager. Alternatively, MOC can be downloaded from its official website.

You can launch MOC by running the command below:

$ mocp

For further information, you can run these commands:

$ man mocp
$ mocp --help

Mp3blaster

Mp3blaster is a command line music player for Linux that can be navigated through a text based user interface using pre-defined keyboard shortcuts. It supports random and looped playback and running tracks can be paused and resumed using numeric keys on the keyboard.

To install Mp3blaster in Ubuntu, use the command specified below:

$ sudo apt install mp3blaster

Mp3blaster can be installed in other Linux distributions from the package manager shipped with the OS. You can also compile it from source code available on its code repository.

You can run Mp3blaster by executing the command below:

$ mp3blaster

For further information, you can run these commands:

$ mp3blaster --help
$ man mp3blaster

Musikcube

Musickcube is a console based music player and streaming server for Linux. Its user interface is mainly keyboard driven but you can also control certain elements using mouse pointer. It features a robust library classification and management interface and can be used as a library to develop third party apps.

To install Musikcube in Ubuntu, use the following command:

$ sudo snap install musikcube

You can also install it in Ubuntu using “.deb” packages available here. Packages for other Linux distributions are available on its GitHub page.

To run Musikcube app in the terminal, use the following command:

$ musickcube.app

For further information, you can run the following command:

$ musickcube.app --help

Mpv

Mpv is one of the most popular media players for Linux, capable of playing both video and audio files. While videos are played in a GUI window, you can use it as a command line music player by passing the “–no-video” option.

To install Mpv in Ubuntu, you can use the command mentioned below:

$ sudo apt install mpv

You can install Mpv in other Linux distributions from package manager or you can download packages available on its official website.

To play all music files in a folder, run a command in the following format:

$ mpv --no-video ~/Downloads/music/

You can pause and resume tracks using the <p> key. For further information on Mpv, run these commands:

$ mpv --help
$ man mpv

VLC

VLC is a free, open source and cross-platform graphical media player. It also includes a command line tool that allows you to run VLC as a standalone music player.

To install VLC player in Ubuntu, you can use the following command:

$ sudo apt install vlc

To install VLC media player in other Linux distributions, search for the term “vlc” in the package manager shipped with the OS. You can also install VLC player from its official website.

To play all music files in a folder, run a command in the following format:

$ vlc -I ncurses --no-video ~/Downloads/music/

You can use the <space> key to pause and resume tracks and <m> to mute and unmute sound. For further information, use these commands:

$ vlc --help
$ man vlc

Mplayer

Mplayer is a graphical media player for Linux capable of playing both audio and video files. You can also use it as a console based music player using its command line interface.

To install Mplayer in Ubuntu, execute the command below:

$ sudo apt install mplayer

You can install Mplayer in other Linux distributions from the package manager or you can download packages from its official website.

To play all music files in a folder, run a command in the following format:

$ mplayer ~/Downloads/music/*

You can pause and resume tracks using the <p> key. For further information on Mplayer, use the following commands:

$ mplayer --help
$ man mplayer

Conclusion

These are some of the most popular console based music players available for Linux. They are especially useful if you are using a minimal desktop environment to save up resources or if you are using a console only user interface.

About the author

Nitesh Kumar

Nitesh Kumar

I am a freelancer software developer and content writer who loves Linux, open source software and the free software community.