I'm new to Mac from the Linux world, and I am looking for a command or file providing a list to default user applications associated with certain filetypes. For example, on Linux:

$ cat /usr/share/applications/defaults.list

provides the application names and priority hierarchies on Linux. I've tried something similar using defaults on the Mac, but I can't seem to find what I'm looking for.

$ defaults read | grep pdf
  name = "1309.0238.pdf";
  name = "1309.0238.pdf";

Does the Mac operating system have a simple, command-line function or accessible file to find the default applications?

2 Answers 2


There is a third-party github project called SwiftDefaultApps, which provides a command line tool and a MacOS Preference pane for listing and setting the URIs, UTIs and their app handlers.

Utility to retrieve and manipulate default applications in macOS.

Available commands: 
- getHandler                              Returns the default application registered for the URI Scheme or <subtype> you specify.
- getApps                                 Returns a list of all registered applications.
- getSchemes                              Returns a list of all known URI schemes, accompanied by their default handler.
- getUTIs                                 Returns a list of all known UTIs, and their default handler.
- setHandler                              Sets <application> as the default handler for a given <type>/<subtype> combination.
- help                                    Prints this help information
- version                                 Prints the current version of this app

(It's a replacement for the long-standing RCDefaultsApp pane, which completely stopped working in Catalina.)

  • 1
    Works with the CLI (but not the GUI strangely). swda setHandler --app /Applications/VLC.app --UTI public.mp3 . Finally I can get rid of that obnoxious Apple music for my mp3 files when listening to music at work. Apr 8, 2022 at 22:35

Not easily. You can use the well-hidden lsregister command to dump the contents of the Launch Services database, which is what controls which file types open with which applications:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump

but its output isn't well documented -- there's some info here, but it's over 10 years old so it's probably at least partially obsolete. A bit of Googling turns up some AppleScripts for further parsing, that you might be able to adopt:

  • You can also use: /S*/L*/F*/C*/F*/L*/S*/lsregister -dump Mar 15, 2017 at 20:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .