A Guide to Using cmus (with examples)
- Linux
- November 5, 2023
Opening cmus in a specified directory
To open cmus in a specific directory, you can use the following command:
cmus path/to/directory
The path/to/directory
argument specifies the directory you want cmus to open in. This command is useful when you have your music files organized in different directories and want to navigate directly to a specific location.
For example, if you want to open cmus in the “Music” directory located in your home folder, you would use the following command:
cmus ~/Music
Adding a file or directory to the cmus library
To add a file or directory to the cmus library, you can use the following command:
:add path/to/file_or_directory
The path/to/file_or_directory
argument specifies the file or directory you want to add to the library. This command is useful when you have new music files that you want to include in cmus for easier access and playback.
For example, if you have a new music album downloaded in the “Downloads/Music” directory, you would use the following command to add it to cmus library:
:add ~/Downloads/Music
Pausing or unpausing the current song
To pause or unpause the current song, you can use the following command:
c
This command is helpful when you need to quickly pause a song that is currently playing in cmus without navigating through the UI.
Toggling shuffle mode on or off
To toggle shuffle mode on or off in cmus, you can use the following command:
s
This command allows you to easily switch the shuffle mode to mix up the order of your music playlist or turn it off to play songs in the sequence they are added.
Quitting cmus
To quit cmus, you can use the following command:
q
This command is useful when you’re done using the music player and want to exit out of the program. It helps to ensure that cmus is properly closed and no processes are running in the background.
Example Output
- Opening cmus in a specified directory:
cmus ~/Music
Output: cmus opens in the “Music” directory with the available music files in that directory ready for playback.
- Adding a file or directory to the cmus library:
:add ~/Downloads/Music
Output: The music files contained in the “Downloads/Music” directory are added to the cmus library and can be accessed and played through cmus.
- Pausing or unpausing the current song:
c
Output: The current song playing in cmus is paused if it is currently playing. If the song is already paused, it will resume playing from the same point.
- Toggling shuffle mode on or off:
s
Output: The shuffle mode in cmus is toggled on or off, depending on its previous state. When enabled, cmus will randomly order the songs in the playlist.
- Quitting cmus:
q
Output: cmus is closed, and you return to the command line.