Skip to main content
C* Music Player:

How to filter music in cmus temporarily

Summary

Learn how to use temporary filters in cmus to refine your music library using metadata like genre, title, and duration. The article contains many filter examples which you can adapt. Also learn how to remove filters quickly when needed.

Introduction #

C* Music Player (cmus) is a lightweight, fast, and powerful command-line music player for Unix-based systems. It allows you to select the music you want to play using metadata-based filtering.

Filters help you display only specific songs that match particular criteria, such as genre, title, or duration. This guide explains how to apply and remove temporary filters in cmus to refine your music selection quickly.

Where cmus gets filtering information from #

cmus uses metadata embedded in audio files to filter music. This metadata includes ID3 tags (commonly used in MP3 files), Vorbis comments (used in Ogg Vorbis files), and other format-specific tagging systems. The player extracts this information when you add files to your library.

Temporary (throwaway) filters #

A temporary filter in cmus, also known as a throwaway filter, is a filter that applies only to the current session. It restricts the displayed songs to those that meet specific criteria but does not permanently alter your music library. Once removed, the full library becomes visible again. Temporary filters are useful for quickly finding specific tracks without modifying your saved playlists.

To apply a temporary filter, use the :filter command followed by your filtering criteria. To remove all active filters, enter :filter without any parameters.

List of filterable attributes #

You can filter music in cmus using the following attributes:

  1. title - The name of the song
  2. artist - The performing artist
  3. album - The album the song belongs to
  4. genre - The genre of the song
  5. date - The year of release
  6. duration - The length of the song (in seconds)
  7. tracknumber - The track number on the album
  8. filename - The name of the file
  9. file path - The directory where the file is located

Examples of temporary filters #

Here are 15 examples of temporary filters you can use in cmus:

  1. Show all songs in the Rap genre:
    :filter genre="Rap"
    
  2. Show all songs in the Hip Hop genre released in 2025:
    :filter genre="Hip Hop" & date=2025
    
  3. Show all Alternative genre songs shorter than 3 minutes (180 seconds):
    :filter genre="Alternative" & duration<180
    
  4. Show all songs with titles starting with “A” that are not in the Pop genre:
    :filter title="A*" & genre!="Pop"
    
  5. Show all songs by the artist “Eminem”:
    :filter artist="Eminem"
    
  6. Show all songs from the album “The Dark Side of the Moon”:
    :filter album="The Dark Side of the Moon"
    
  7. Show all songs from the 1990s (1990-1999):
    :filter date>=1990 & date<=1999
    
  8. Show all songs longer than 5 minutes (300 seconds):
    :filter duration>300
    
  9. Show all songs with “live” in the filename:
    :filter filename="*live*"
    
  10. Show all songs stored in the “Rock” directory:
    :filter file path="*/Rock/*"
    
  11. Show all songs by “The Beatles” released before 1970:
    :filter artist="The Beatles" & date<1970
    
  12. Show all Jazz songs longer than 4 minutes and released after 2000:
    :filter genre="Jazz" & duration>240 & date>2000
    
  13. Show all Pop songs from 2010-2020 that are shorter than 3 minutes:
    :filter genre="Pop" & date>=2010 & date<=2020 & duration<180
    
  14. Show all songs from the album “Thriller” that are longer than 5 minutes:
    :filter album="Thriller" & duration>300
    
  15. Show all songs in the “Electronic” genre that have “Remix” in the title:
    :filter genre="Electronic" & title="*Remix*"
    

These examples demonstrate how flexible and powerful cmus filtering is, helping you refine your music selection on the fly.

Removing temporary filters #

To clear any applied filter and return to viewing the full library, simply type:

:filter

This command resets the filter and displays all songs in your library again.

FAQ's #

Most common questions and brief, easy-to-understand answers on the topic:

What is a temporary filter in cmus?

A temporary filter in cmus is a session-based filter that limits the displayed songs based on specific criteria, such as genre or artist. It does not modify the library permanently.

How do I apply a filter in cmus?

You can apply a filter in cmus by using the command :filter followed by filtering criteria, such as :filter genre="Rock" to show only Rock songs.

How do I remove a filter in cmus?

To remove a filter and display the full library again, simply enter :filter without any parameters.

Can I combine multiple filtering criteria in cmus?

Yes, you can combine multiple criteria using &. For example, :filter genre="Jazz" & duration>240 shows Jazz songs longer than 4 minutes.

Does applying a filter in cmus affect my saved playlists?

No, filters in cmus are temporary and do not affect your saved playlists or permanently modify your library.

Further readings #

Sources and recommended, further resources on the topic:

Author

Jonas Jared Jacek • J15k

Jonas Jared Jacek (J15k)

Jonas works as project manager, web designer, and web developer since 2001. On top of that, he is a Linux system administrator with a broad interest in things related to programming, architecture, and design. See: https://www.j15k.com/

License

How to filter music in cmus temporarily by Jonas Jared Jacek is licensed under CC BY-SA 4.0.

This license requires that reusers give credit to the creator. It allows reusers to distribute, remix, adapt, and build upon the material in any medium or format, for noncommercial purposes only. To give credit, provide a link back to the original source, the author, and the license e.g. like this:

<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><a property="dct:title" rel="cc:attributionURL" href="https://www.ditig.com/cmus-temporary-filters">How to filter music in cmus temporarily</a> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://www.j15k.com/">Jonas Jared Jacek</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="license noopener noreferrer">CC BY-SA 4.0</a>.</p>

For more information see the Ditig legal page.

All Topics

Random Quote

“Less is more.”

Ludwig Mies van der Rohe German architect and designerWord of mouth, - IT quotes