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.
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.
All you need to do in Terminal, no mater directory you're in, is use
open -a Safari
open -a Google\ Chrome and optionally, add the URL afterwards if you want to open the Browser to the given URL:
open -a Safari http://apple.com/.