til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as a developer

View project on GitHub

Set Default Browser From the Command Line

This can be done using the tool: defaultbrowser

Works like a charm.

With no arguments lists your browsers and marks the one being the default.

$ defaultbrowser
  iterm2
* chrome
  firefoxdeveloperedition
  safari
  vlc
  evernote
  netnewswire

Setting it is simply by providing an argument, matching the list

$ defaultbrowser chrome

Do note that this displays a GUI dialog,

GUI dialog

Currently there is no fix for this minor inexpediency, the dialog can be expedites with a swift (tab) followed by a (space).

References