Ubuntu – Which configuration file should I edit to configure file type association

configurationfile association

I am using ubuntu 18.04. I am trying to change PHP file association with sublime text and it is currently associated with foxit reader. I tried to change it by using "open with" menu option.But it doesn't apply even after I restarted my computer. So I need to change it by my own without using menu options.

Best Answer

Try this:

Edit the file ~/.local/config/mimeapps.list and under the [Default Applications] add application/x-php=sublime.desktop;, if that's the name of sublime desktop file.

[Default Applications]
...
application/x-php=sublime.desktop;
Related Question