Setting the Default Web Browser from Command Line on Mac
![]()
Many advanced Mac users spend a lot of time working from the command line with the Terminal application. The command line offers ways to interact with various settings in MacOS through defaults commands and other tricks, so it’s a reasonable question to wonder if you can set or change the default web browser on a Mac by using the Terminal. Sure, Mac users can change the default web browser at any time by using System Settings on modern MacOS, or System Preferences on older macOS versions, but what if you wish to change the default web browser through the command line on the Mac?
There are two different ways to set the default web browser on a Mac from the command line, and we’ll cover both.


















