Play Music from Command Line via MOC in Linux Mint
If you’re looking to play your local music directly from the Linux terminal or command console, MOC is a great option. MOC, short for Music On Console, is a lightweight music player similar to MPD. It offers a user-friendly command line interface with a folder tree on the left, a playlist on the right, and current playback information on the bottom, making it easy to navigate and control your music
Moc is already available inside the Linux Mint system’s repository, so it can be directly installed by the following command in the terminal.
sudo apt update sudo apt install moc

You check the version on MOC by running the command
mocp -V

To launch the player, run the following command in the terminal.
mocp

Here’s the list of shortcut keys that you can use inside the terminal while playing music through MOC
Start playing at this file or go to this directory | Enter |
Pause | Space or p |
Play next file | n |
Play previous file | b |
Silent seek forward by 5s | ] |
Silent seek backward by 5s | [ |
Switch between playlist and file list | Tab |
Add a file/directory to the playlist | a |
Add a directory recursively to the playlist | Shift+a |
Delete an item from the playlist | d |
Clear the playlist | Shift+c |
Increase volume by 1% | > |
Decrease volume by 1% | < |
Increase volume by 5% | . (period) |
Decrease volume by 5% | , (comma) |
Set volume to 10% | Alt+1 |
Set volume to 90% | Alt+9 |
Detach MOC from the server | q |
Quit | Shift+q |