“mocp” (Music on Console Player) is a text-based audio player for Linux and Unix-like systems. It is a console application that allows you to play audio files from the command line, without the need for a graphical user interface.
“mocp” supports a wide range of audio formats, including MP3, Ogg Vorbis, FLAC, and others. It also provides several features, including playlists, repeat and shuffle modes, equalizer, and others. The player has a simple, straightforward interface, making it easy to navigate and control playback.
The “mocp” command can be used to start the player, play audio files, and control playback. For example, you can use the “mocp” command to start the player, play an audio file, pause playback, skip to the next or previous track, and adjust the volume. The player also provides several command line options and configuration files, allowing you to customize the player’s behavior and appearance.
“mocp” is a popular choice for Linux users who prefer a text-based audio player, or for users who use the command line frequently. It is highly configurable and provides a flexible, efficient, and user-friendly audio player experience.
If you encounter the below error while running the command mocp:
mocp: command not found
you may try installing the below package as per your choice of distribution:
Distribution | Command |
---|---|
Debian | apt-get install moc |
Ubuntu | apt-get install moc |
Alpine | apk add moc |
Arch Linux | pacman -S moc |
Kali Linux | apt-get install moc |
OS X | brew install moc |
Raspbian | apt-get install moc |
mocp Command Examples
1. Launch the MOC terminal UI:
# mocp
2. Launch the MOC terminal UI in a specific directory:
# mocp path/to/directory
3. Start the MOC server in the background, without launching the MOC terminal UI:
# mocp --server
4. Add a specific song to the play queue while MOC is in the background:
# mocp --enqueue path/to/audio_file
5. Add songs recursively to the play queue while MOC is in the background:
# mocp --append path/to/directory
6. Clear the play queue while MOC is in the background:
# mocp --clear
7. Play or stop the currently queued song while MOC is in the background:
# mocp --play|stop
8. Stop the MOC server while it’s in the background:
# mocp --exit