+8 votes
in Software by (1.5m points)

How to play music from the Linux terminal

1 Answer

+9 votes
by (725k points)
 
Best answer

Every time we look for lighter and minimalist audio players , something that we can take to the extreme if we use the terminal to play our favorite music. The truth is that there is nothing more minimalist and lighter than the terminal itself, but it is also true that the terminal is not something that users new to the Linux universe like. Anyway, we are going to show you how to play music from the Linux terminal .

image

We have chosen the CMUS player , which is a very practical C player programmed and very easy to install. It is a free and open source audio player, designed for UNIX systems. It has an official page on GitHub where we can find all the information about CMUS (in English) .

How to play music from the Linux terminal.

CMUS installation.

In our case we have tested it on Ubuntu 16.04 and the installation process has been as simple as executing the sudo apt-get install cmus command. We also have the option to compile it from the source code in case you don't find it in the repositories of your distribution.

Supported audio formats and functionality.

Despite having such a simple appearance, CMUS supports a large number of audio formats , among which we can find some of the most used: MP3, Ogg Vorbis, WAV, MP4, FLAC, WavPack, Opus, Musepack, AAC, audio CD , etc. It also includes support for all supported formats FFmpeg (APE, WMA, MKA, etc.) and libmodplug (MOD, S3M, XM, IT, 669, AMF, AMS, etc) .

It also includes support for Last.fm and Libre.fm. You can even find extensions on the CMUS Wiki with which you can play music from YouTube and even Spotify.

Interface and operation from the keyboard.

The CMUS interface is handled with keyboard commands, in a manner similar to that used by the Vi editor. For example, if we want to add a folder with music we will use the command :add /ruta/musica/ .

image

This interface is divided into two columns, in one the different artists are ordered and in the other the different songs or tracks. To change between one or the other we will use the TAB (tab) button .

CMUS is fully controlled from the keyboard and we can use shortcuts such as pressing the b key to move to the next song, z to jump to the previous song or x to replay the song.

Alternatives to CMUS.

There is an alternative CMUS terminal player, it is called MOC (Music On Console) and consists of two parts, a server (moc) and a player or interface (mocp) . The operation and interface is similar to that of CMUS, so you can choose between one or the other.


Most popular questions within the last 20 days

...