Open Browser from Terminal – How to Open Google Chrome or Safari from Terminal

google-chromesafariterminal

When I try to open 'chrome' or 'safari' in terminal,

$ safari
-bash: safari: command not found
$ open safari
The file Desktop/safari does not exist.
$ chrome
-bash: chrome: command not found

How to open them in right methods.

Best Answer

Its trying to open the files from the Desktop folder. Safari is in the Applications folder. From the top level / you should type open Applications/safari This works fine for me. cd up to / and do ls. The Application folder should show up. If not you are in the wrong directory.