CMUS player – A Terminal based music player

Play Music In The Linux Terminal

There are plenty of music players out there, both for Windows and Linux. But Linux has a slight advantage here – developers have actually created a music player written in C programming language which can be accessed via the Linux Terminal.

This is really advantageous for people who have older hardware, as terminal-based applications generally only use 2-50MB of RAM. In this article, we will discuss one such music player named CMUS or C* Music Player.

Also read: Top 5 Music Players Available on Ubuntu

Features

It contains all the essential features required for a Music Player, but the following features really make it stand out from other music players.

  • Speed: Doesn’t matter how large your library is, cmus will pretty much instantaneously load and display all your media files.
  • Key bindings: Because it is terminal-based, you’d want it to support customizable keyboard shortcuts for various tasks, and it does!
  • Themes: You can either go with the default cmus theme or you can create your own as per your preferences!
  • Gapless playback: The app itself is capable of playing media back to back without any break, it also supports queueing media and creating playlists.

Installing CMUS

CMUS is available in the official repositories of all the Linux distributions, so the installation is really simple, just open the Terminal application and type the command as per your distribution.

For Ubuntu and Debian based distributions:

sudo apt update && sudo apt install cmus

For Arch Linux and Arch-based distributions:

sudo pacman -S cmus

And in Fedora Workstation, open a terminal and type:

Sudo dnf install cmus

Great, let’s see how this media player works now.

Using CMUS player

First, open a Terminal and launch the player by typing the following command :

cmus
CMUS Player
CMUS Player

Now, use follow the guide for a smooth experience.

Load your Music library

As you can see, it doesn’t automatically point towards the directory where you have stored your music library. Press 5 on the keyboard and navigate to the music directory, and press 1 to enter the directory.

Point Towards Your Music Directory
Point Towards Your Music Directory

As you can see, the media is displayed nicely now, and you can press enter to play the files. Type the following to let cmus remember the current location 

:save

If you want cmus to instantaneously load all the Music files in a specific library, then you can type the name of the directory like this :

:a ~/Music/

Useful Key bindings

By default, cmus has assigned itself the following keys to itself for functionality:

  • v – Stop playback
  • b – next track
  • z – previous track
  • c – Play/Pause
  • s – toggle shuffle
  • m – toggles the “aaa mode.” aaa stands for artist, album, or all
  • x – replay the song
  • i – jump view to the currently playing track (handy in shuffle mode, and follow is off.)
  • f – toggle follow. When follow is on, the selection bar will jump to the next playing track.
  • /<name> – Search any  media file
  • (-) – Reduces Volume by 10%
  • (+) – Increases volume by 10%

Refresh Cache

If you have added a new file in your media library, then for that song to be available in cmus, you will have to refresh the cache in cmus. You can do that by typing the following command :

update-cache

OR, you can type :

:clear
:a ~/Music

Manage Playlist

The playlist is in the 3rd view, i.e, you can press ‘3’ to access it. But first, let’s add some songs to our playlist, go into the 2nd view, and press y to add the highlighted track to the playlist.

Adding Songs To The Playlist
Adding Songs To The Playlist

Now, again go to the 3rd view and now, you can press p or P key to move tracks up and down in the playlist respectively, and you can press D to delete the track from the playlist.

Manage Queue

Let’s say you don’t want to create a playlist and just want a track to play after the current song is over. Just go to a song and press ‘e’ key to add a song to the queue. Press 4 to view/edit the queue.

Adding Songs To The Queue
Adding Songs To The Queue

You can again use the p, P key to move tracks up and down the queue and press D to remove the song from the queue.

Exit

When you’re done playing the tracks, just type the following to exit :

:q

This will save your queues, playlists library, and settings, and you will see the same settings when you launch CMUS again.

Summary

We hope you’ve enjoyed learning about all the keyboard shortcuts for the CMUS music player. Now go forth and play your songs with ease on your high-end hardware! Thank you for reading.