xdg-mime is a command-line tool used to query and manage MIME type associations on Linux and other Unix-like systems that follow the freedesktop.org standards. It allows users and applications to determine the MIME type of a file and to configure the default application used to open specific file types.
The utility is commonly used within desktop environments to ensure that files open with the correct applications. It supports querying file types, setting default handlers for MIME types, and inspecting the applications associated with particular formats.
This is free and open source software.
Key Features
- Queries the MIME type of files.
- Determines the default application associated with a MIME type.
- Sets the default application used to open specific file types.
- Integrates with freedesktop.org MIME and desktop entry specifications.
- Supports scripting and automation for managing file associations.
- Works across multiple desktop environments that follow XDG standards.
Website: gitlab.freedesktop.org/xdg/xdg-utils
Support:
Developer: freedesktop.org
License: MIT License

Related Software
| Alternatives to file | |
|---|---|
| fil | Unix file command written in Go |
| mimetype | Determines the MIME type of files |
| xdg-mime | Part of xdg-utils |
| TrID | Identify file types from their binary signatures |
| binwalk | Search a given binary image for embedded files |
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.