xdg-mime
TLDR
Display the MIME type of a file
SYNOPSIS
xdg-mime command [arguments]
DESCRIPTION
xdg-mime queries and manages MIME types according to the XDG (freedesktop.org) standard. It can detect file types, query default applications, and set application associations.
The tool integrates with the desktop environment's MIME type handling, storing user preferences in ~/.config/mimeapps.list.
PARAMETERS
query filetype _file_
Display the MIME type of a filequery default _mimetype_
Display the default application for a MIME typedefault _application_ _mimetype_...
Set default application for MIME typesinstall _mimetypes-file_
Install a MIME type definitionuninstall _mimetypes-file_
Uninstall a MIME type definition
CAVEATS
Application associations use .desktop file names. Changes may require restarting applications to take effect. Works with XDG-compliant desktop environments.
SEE ALSO
xdg-open(1), xdg-settings(1), update-mime-database(1)
