# Set default app for file type on Mac

**URL:** <https://community.unix.com/t/set-default-app-for-file-type-on-mac/247052>\
**Category:** Shell Programming and Scripting\
**Created:** [August 14, 2009, 10:01am UTC](https://community.unix.com/t/set-default-app-for-file-type-on-mac/247052 "2009-08-14T10:01:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davewg](https://community.unix.com/letter_avatar/davewg/32/6_449c533f586939b6e5f246632a46421f.png) [@davewg](https://community.unix.com/u/davewg)\
**Post date:** [August 14, 2009, 10:01am UTC](https://community.unix.com/t/set-default-app-for-file-type-on-mac/247052/1 "2009-08-14T10:01:33Z")

</div>

Hi there,

We have 2 apps on our customers machines that can both open files with the same file extension. Is there any way via shell commands to set which application should be the default?

Essentially, I'm hoping to replicate Get Info \> Open With \> Change All using a shell script, but I just can't find a way of doing it. I thought lsregister might be the way, but no luck ☹

Thanks in advance!  
Dave
