“which” command doesn't work / path of Safari? The 2019 Stack Overflow Developer Survey Results Are InReset your PATH variableIn OSX Yosemite, why can I set many environment variables for GUI apps, but cannot set the specific variable PATHIn the light of the FREAK TLS vulnerability, how may I disable insecure cipher suites manually in Safari?Adding a directory to $PATH doesn't work in YosemiteA complicated script to automate functions in SafariTerminal command to clear DNS cache doesn't seem to workCommand found with `which` at the new paths but still tries to run from the old pathHow can I move files or directories marked as a backup?mysql on OSX suddenly stopped functioning, unable to locate or connectCommand path for exit

Is bread bad for ducks?

How was Skylab's orbit inclination chosen?

Time travel alters history but people keep saying nothing's changed

Idiomatic way to prevent slicing?

JSON.serialize: is it possible to suppress null values of a map?

Limit the amount of RAM Mathematica may access?

Springs with some finite mass

Does duplicating a spell with Wish count as casting that spell?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Monty Hall variation

Understanding the implication of what "well-defined" means for the operation in quotient group

Inline version of a function returns different value than non-inline version

Does light intensity oscillate really fast since it is a wave?

Where does the "burst of radiance" from Holy Weapon originate?

Manuscript was "unsubmitted" because the manuscript was deposited in Arxiv Preprints

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Lethal sonic weapons

Why do I get badly formatted numerical results when I use StringForm?

Why is the maximum length of OpenWrt’s root password 8 characters?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

How to create dashed lines/arrows in Illustrator

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

How to manage monthly salary

In microwave frequencies, do you use a circulator when you need a (near) perfect diode?



“which” command doesn't work / path of Safari?



The 2019 Stack Overflow Developer Survey Results Are InReset your PATH variableIn OSX Yosemite, why can I set many environment variables for GUI apps, but cannot set the specific variable PATHIn the light of the FREAK TLS vulnerability, how may I disable insecure cipher suites manually in Safari?Adding a directory to $PATH doesn't work in YosemiteA complicated script to automate functions in SafariTerminal command to clear DNS cache doesn't seem to workCommand found with `which` at the new paths but still tries to run from the old pathHow can I move files or directories marked as a backup?mysql on OSX suddenly stopped functioning, unable to locate or connectCommand path for exit



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















Why can’t I locate programs like Chrome or Safari or FireFox with the which command line tool?



pasocon:~ ThisUser$ which python
/anaconda3/bin/python
pasocon:~ ThisUser$ which firefox
pasocon:~ ThisUser$ which Safari
pasocon:~ ThisUser$ which chrome
pasocon:~ ThisUser$


This is what I get with the which command. It is not giving me the path for many applications. Am I making a mistake here or is this potentially an issue to be fixed?



Alternatively, I was just looking for the path of Safari (so that you can open Safari by directing to this path in a configuration file). I am sure this is basic knowledge but I've somehow failed to find it.










share|improve this question









New contributor




Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    3















    Why can’t I locate programs like Chrome or Safari or FireFox with the which command line tool?



    pasocon:~ ThisUser$ which python
    /anaconda3/bin/python
    pasocon:~ ThisUser$ which firefox
    pasocon:~ ThisUser$ which Safari
    pasocon:~ ThisUser$ which chrome
    pasocon:~ ThisUser$


    This is what I get with the which command. It is not giving me the path for many applications. Am I making a mistake here or is this potentially an issue to be fixed?



    Alternatively, I was just looking for the path of Safari (so that you can open Safari by directing to this path in a configuration file). I am sure this is basic knowledge but I've somehow failed to find it.










    share|improve this question









    New contributor




    Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      3












      3








      3








      Why can’t I locate programs like Chrome or Safari or FireFox with the which command line tool?



      pasocon:~ ThisUser$ which python
      /anaconda3/bin/python
      pasocon:~ ThisUser$ which firefox
      pasocon:~ ThisUser$ which Safari
      pasocon:~ ThisUser$ which chrome
      pasocon:~ ThisUser$


      This is what I get with the which command. It is not giving me the path for many applications. Am I making a mistake here or is this potentially an issue to be fixed?



      Alternatively, I was just looking for the path of Safari (so that you can open Safari by directing to this path in a configuration file). I am sure this is basic knowledge but I've somehow failed to find it.










      share|improve this question









      New contributor




      Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      Why can’t I locate programs like Chrome or Safari or FireFox with the which command line tool?



      pasocon:~ ThisUser$ which python
      /anaconda3/bin/python
      pasocon:~ ThisUser$ which firefox
      pasocon:~ ThisUser$ which Safari
      pasocon:~ ThisUser$ which chrome
      pasocon:~ ThisUser$


      This is what I get with the which command. It is not giving me the path for many applications. Am I making a mistake here or is this potentially an issue to be fixed?



      Alternatively, I was just looking for the path of Safari (so that you can open Safari by directing to this path in a configuration file). I am sure this is basic knowledge but I've somehow failed to find it.







      macos terminal safari command-line path






      share|improve this question









      New contributor




      Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 2 days ago









      bmike

      161k46290629




      161k46290629






      New contributor




      Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 days ago









      RethliopuksRethliopuks

      1183




      1183




      New contributor




      Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Rethliopuks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          4 Answers
          4






          active

          oldest

          votes


















          12














          which searches for binaries in the $PATH, a.k.a. command-line tools. User applications are not such tools and not available in the command line.



          While Safari.app is an application, the Safari binary is not usually added to the $PATH because it is not a command line tool — if you just run Safari in Terminal your shell will inform you that the command cannot be found.



          To find the path to an application, you can use lsregister, which is a tool for adding and querying the Launch Services database, used by macOS in part to find applications.



          /System/Library/Frameworks/CoreServices.framework/
          Versions/A/Frameworks/LaunchServices.framework/
          Versions/A/Support/lsregister




          You can -dump the database and filter with grep.



          /System/L*/Fr*/CoreSe*/V*/A/F*/L*/V*/A/S*/lsregister -dump |
          grep -ie "path:.*safari"




           path: /Applications/Safari.app


          This will return every instance of Safari registered with Launch Services, which will include backups. If you just want to open Safari, you shouldn't be dealing with getting paths and handling it yourself; instead, get macOS to do that for you: open -a Safari.






          share|improve this answer




















          • 2





            As much as I love the wildcards, I worry that someday Apple will add another service with a similar path and break the commands. It would be good to expand the path fully; it also makes it clearer just what’s being executed.

            – nneonneo
            2 days ago






          • 1





            @nneonneo I was under the impression that first point wasn’t an issue, since providing the full name of the tool at the end will ensure the correct tool is always found, for example try running /System/*/*/*/*/A/*/*/*/A/*/lsregister — the path given in the answer will be faster than the path in this comment since the answer provides enough to be unique, but both should work just as well! (‘A’ is preserved in this minimal path since ‘Current’ is symlinked to ‘A’.) I’ll see about grabbing the full path and adding it to the answer if you really think it improves clarity.

            – grg
            2 days ago






          • 1





            I mean, I just don’t see how a bunch of wildcards is clear at all as to what’s being run. I would much rather see a long, deep path than a bunch of wildcards, and I think that would be a lot clearer.

            – nneonneo
            2 days ago


















          5














          This is working as designed.



          which is a command line executable that looks on your path (and other parts of shell environment) to find things you can start from the command line



          Applications like Safari (anything bundled as an application which will be a directory ending in .app with certain files in specific sub directories) are not launched from the command line. They are launched from the desktop and not via any shell commands.



          You can however launch applications from the command line using the command open. man open gives details. The example to launch Safari is open -a Safari



          Note that if you are trying to open Safari when you login putting this command in your shell files will not work as the shell is not run until you launch Terminal.app.

          The easiest way to launch Safari at login is to run the app from the desktop, right click on the app's icon in the dock and choose Options then Open at Login.

          There is also a list of things that are launched at login for each user in System Preferences->Users & Groups and this can be edited there.






          share|improve this answer






























            3














            On macOS applications aren‘t part of the standard PATH and can‘t be started by calling them from the command line (well, yes, they can, but it‘s not so easy). But you can use



            open foo.html


            or



            open -a Safari


            to start Safari from bash.






            share|improve this answer






























              2














              Add following in your .bash_profile.



              alias safari="/Applications/Safari.app/Contents/MacOS/Safari" 


              You can now start safari in your Terminal. As mentioned before, .app are bundles and cannot start directly from Terminal.



              To Edit your .bash_profile:



              1. Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the pwd command. Usually /Users/Username.


              2. add the alias Line above at the end of the document.


              3. type CTRL-O to save the file

              4. type CTRL-X to exit nano

              5. type source .bash_profile to update

              6. type safari to start Safari.

              You can do this with most of the applications in the /Application-Folder.






              share|improve this answer


















              • 1





                This is a very special case - I would think open is the better command unless you have a very special need.

                – Mark
                2 days ago


















              4 Answers
              4






              active

              oldest

              votes








              4 Answers
              4






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              12














              which searches for binaries in the $PATH, a.k.a. command-line tools. User applications are not such tools and not available in the command line.



              While Safari.app is an application, the Safari binary is not usually added to the $PATH because it is not a command line tool — if you just run Safari in Terminal your shell will inform you that the command cannot be found.



              To find the path to an application, you can use lsregister, which is a tool for adding and querying the Launch Services database, used by macOS in part to find applications.



              /System/Library/Frameworks/CoreServices.framework/
              Versions/A/Frameworks/LaunchServices.framework/
              Versions/A/Support/lsregister




              You can -dump the database and filter with grep.



              /System/L*/Fr*/CoreSe*/V*/A/F*/L*/V*/A/S*/lsregister -dump |
              grep -ie "path:.*safari"




               path: /Applications/Safari.app


              This will return every instance of Safari registered with Launch Services, which will include backups. If you just want to open Safari, you shouldn't be dealing with getting paths and handling it yourself; instead, get macOS to do that for you: open -a Safari.






              share|improve this answer




















              • 2





                As much as I love the wildcards, I worry that someday Apple will add another service with a similar path and break the commands. It would be good to expand the path fully; it also makes it clearer just what’s being executed.

                – nneonneo
                2 days ago






              • 1





                @nneonneo I was under the impression that first point wasn’t an issue, since providing the full name of the tool at the end will ensure the correct tool is always found, for example try running /System/*/*/*/*/A/*/*/*/A/*/lsregister — the path given in the answer will be faster than the path in this comment since the answer provides enough to be unique, but both should work just as well! (‘A’ is preserved in this minimal path since ‘Current’ is symlinked to ‘A’.) I’ll see about grabbing the full path and adding it to the answer if you really think it improves clarity.

                – grg
                2 days ago






              • 1





                I mean, I just don’t see how a bunch of wildcards is clear at all as to what’s being run. I would much rather see a long, deep path than a bunch of wildcards, and I think that would be a lot clearer.

                – nneonneo
                2 days ago















              12














              which searches for binaries in the $PATH, a.k.a. command-line tools. User applications are not such tools and not available in the command line.



              While Safari.app is an application, the Safari binary is not usually added to the $PATH because it is not a command line tool — if you just run Safari in Terminal your shell will inform you that the command cannot be found.



              To find the path to an application, you can use lsregister, which is a tool for adding and querying the Launch Services database, used by macOS in part to find applications.



              /System/Library/Frameworks/CoreServices.framework/
              Versions/A/Frameworks/LaunchServices.framework/
              Versions/A/Support/lsregister




              You can -dump the database and filter with grep.



              /System/L*/Fr*/CoreSe*/V*/A/F*/L*/V*/A/S*/lsregister -dump |
              grep -ie "path:.*safari"




               path: /Applications/Safari.app


              This will return every instance of Safari registered with Launch Services, which will include backups. If you just want to open Safari, you shouldn't be dealing with getting paths and handling it yourself; instead, get macOS to do that for you: open -a Safari.






              share|improve this answer




















              • 2





                As much as I love the wildcards, I worry that someday Apple will add another service with a similar path and break the commands. It would be good to expand the path fully; it also makes it clearer just what’s being executed.

                – nneonneo
                2 days ago






              • 1





                @nneonneo I was under the impression that first point wasn’t an issue, since providing the full name of the tool at the end will ensure the correct tool is always found, for example try running /System/*/*/*/*/A/*/*/*/A/*/lsregister — the path given in the answer will be faster than the path in this comment since the answer provides enough to be unique, but both should work just as well! (‘A’ is preserved in this minimal path since ‘Current’ is symlinked to ‘A’.) I’ll see about grabbing the full path and adding it to the answer if you really think it improves clarity.

                – grg
                2 days ago






              • 1





                I mean, I just don’t see how a bunch of wildcards is clear at all as to what’s being run. I would much rather see a long, deep path than a bunch of wildcards, and I think that would be a lot clearer.

                – nneonneo
                2 days ago













              12












              12








              12







              which searches for binaries in the $PATH, a.k.a. command-line tools. User applications are not such tools and not available in the command line.



              While Safari.app is an application, the Safari binary is not usually added to the $PATH because it is not a command line tool — if you just run Safari in Terminal your shell will inform you that the command cannot be found.



              To find the path to an application, you can use lsregister, which is a tool for adding and querying the Launch Services database, used by macOS in part to find applications.



              /System/Library/Frameworks/CoreServices.framework/
              Versions/A/Frameworks/LaunchServices.framework/
              Versions/A/Support/lsregister




              You can -dump the database and filter with grep.



              /System/L*/Fr*/CoreSe*/V*/A/F*/L*/V*/A/S*/lsregister -dump |
              grep -ie "path:.*safari"




               path: /Applications/Safari.app


              This will return every instance of Safari registered with Launch Services, which will include backups. If you just want to open Safari, you shouldn't be dealing with getting paths and handling it yourself; instead, get macOS to do that for you: open -a Safari.






              share|improve this answer















              which searches for binaries in the $PATH, a.k.a. command-line tools. User applications are not such tools and not available in the command line.



              While Safari.app is an application, the Safari binary is not usually added to the $PATH because it is not a command line tool — if you just run Safari in Terminal your shell will inform you that the command cannot be found.



              To find the path to an application, you can use lsregister, which is a tool for adding and querying the Launch Services database, used by macOS in part to find applications.



              /System/Library/Frameworks/CoreServices.framework/
              Versions/A/Frameworks/LaunchServices.framework/
              Versions/A/Support/lsregister




              You can -dump the database and filter with grep.



              /System/L*/Fr*/CoreSe*/V*/A/F*/L*/V*/A/S*/lsregister -dump |
              grep -ie "path:.*safari"




               path: /Applications/Safari.app


              This will return every instance of Safari registered with Launch Services, which will include backups. If you just want to open Safari, you shouldn't be dealing with getting paths and handling it yourself; instead, get macOS to do that for you: open -a Safari.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited yesterday

























              answered 2 days ago









              grggrg

              138k25219323




              138k25219323







              • 2





                As much as I love the wildcards, I worry that someday Apple will add another service with a similar path and break the commands. It would be good to expand the path fully; it also makes it clearer just what’s being executed.

                – nneonneo
                2 days ago






              • 1





                @nneonneo I was under the impression that first point wasn’t an issue, since providing the full name of the tool at the end will ensure the correct tool is always found, for example try running /System/*/*/*/*/A/*/*/*/A/*/lsregister — the path given in the answer will be faster than the path in this comment since the answer provides enough to be unique, but both should work just as well! (‘A’ is preserved in this minimal path since ‘Current’ is symlinked to ‘A’.) I’ll see about grabbing the full path and adding it to the answer if you really think it improves clarity.

                – grg
                2 days ago






              • 1





                I mean, I just don’t see how a bunch of wildcards is clear at all as to what’s being run. I would much rather see a long, deep path than a bunch of wildcards, and I think that would be a lot clearer.

                – nneonneo
                2 days ago












              • 2





                As much as I love the wildcards, I worry that someday Apple will add another service with a similar path and break the commands. It would be good to expand the path fully; it also makes it clearer just what’s being executed.

                – nneonneo
                2 days ago






              • 1





                @nneonneo I was under the impression that first point wasn’t an issue, since providing the full name of the tool at the end will ensure the correct tool is always found, for example try running /System/*/*/*/*/A/*/*/*/A/*/lsregister — the path given in the answer will be faster than the path in this comment since the answer provides enough to be unique, but both should work just as well! (‘A’ is preserved in this minimal path since ‘Current’ is symlinked to ‘A’.) I’ll see about grabbing the full path and adding it to the answer if you really think it improves clarity.

                – grg
                2 days ago






              • 1





                I mean, I just don’t see how a bunch of wildcards is clear at all as to what’s being run. I would much rather see a long, deep path than a bunch of wildcards, and I think that would be a lot clearer.

                – nneonneo
                2 days ago







              2




              2





              As much as I love the wildcards, I worry that someday Apple will add another service with a similar path and break the commands. It would be good to expand the path fully; it also makes it clearer just what’s being executed.

              – nneonneo
              2 days ago





              As much as I love the wildcards, I worry that someday Apple will add another service with a similar path and break the commands. It would be good to expand the path fully; it also makes it clearer just what’s being executed.

              – nneonneo
              2 days ago




              1




              1





              @nneonneo I was under the impression that first point wasn’t an issue, since providing the full name of the tool at the end will ensure the correct tool is always found, for example try running /System/*/*/*/*/A/*/*/*/A/*/lsregister — the path given in the answer will be faster than the path in this comment since the answer provides enough to be unique, but both should work just as well! (‘A’ is preserved in this minimal path since ‘Current’ is symlinked to ‘A’.) I’ll see about grabbing the full path and adding it to the answer if you really think it improves clarity.

              – grg
              2 days ago





              @nneonneo I was under the impression that first point wasn’t an issue, since providing the full name of the tool at the end will ensure the correct tool is always found, for example try running /System/*/*/*/*/A/*/*/*/A/*/lsregister — the path given in the answer will be faster than the path in this comment since the answer provides enough to be unique, but both should work just as well! (‘A’ is preserved in this minimal path since ‘Current’ is symlinked to ‘A’.) I’ll see about grabbing the full path and adding it to the answer if you really think it improves clarity.

              – grg
              2 days ago




              1




              1





              I mean, I just don’t see how a bunch of wildcards is clear at all as to what’s being run. I would much rather see a long, deep path than a bunch of wildcards, and I think that would be a lot clearer.

              – nneonneo
              2 days ago





              I mean, I just don’t see how a bunch of wildcards is clear at all as to what’s being run. I would much rather see a long, deep path than a bunch of wildcards, and I think that would be a lot clearer.

              – nneonneo
              2 days ago













              5














              This is working as designed.



              which is a command line executable that looks on your path (and other parts of shell environment) to find things you can start from the command line



              Applications like Safari (anything bundled as an application which will be a directory ending in .app with certain files in specific sub directories) are not launched from the command line. They are launched from the desktop and not via any shell commands.



              You can however launch applications from the command line using the command open. man open gives details. The example to launch Safari is open -a Safari



              Note that if you are trying to open Safari when you login putting this command in your shell files will not work as the shell is not run until you launch Terminal.app.

              The easiest way to launch Safari at login is to run the app from the desktop, right click on the app's icon in the dock and choose Options then Open at Login.

              There is also a list of things that are launched at login for each user in System Preferences->Users & Groups and this can be edited there.






              share|improve this answer



























                5














                This is working as designed.



                which is a command line executable that looks on your path (and other parts of shell environment) to find things you can start from the command line



                Applications like Safari (anything bundled as an application which will be a directory ending in .app with certain files in specific sub directories) are not launched from the command line. They are launched from the desktop and not via any shell commands.



                You can however launch applications from the command line using the command open. man open gives details. The example to launch Safari is open -a Safari



                Note that if you are trying to open Safari when you login putting this command in your shell files will not work as the shell is not run until you launch Terminal.app.

                The easiest way to launch Safari at login is to run the app from the desktop, right click on the app's icon in the dock and choose Options then Open at Login.

                There is also a list of things that are launched at login for each user in System Preferences->Users & Groups and this can be edited there.






                share|improve this answer

























                  5












                  5








                  5







                  This is working as designed.



                  which is a command line executable that looks on your path (and other parts of shell environment) to find things you can start from the command line



                  Applications like Safari (anything bundled as an application which will be a directory ending in .app with certain files in specific sub directories) are not launched from the command line. They are launched from the desktop and not via any shell commands.



                  You can however launch applications from the command line using the command open. man open gives details. The example to launch Safari is open -a Safari



                  Note that if you are trying to open Safari when you login putting this command in your shell files will not work as the shell is not run until you launch Terminal.app.

                  The easiest way to launch Safari at login is to run the app from the desktop, right click on the app's icon in the dock and choose Options then Open at Login.

                  There is also a list of things that are launched at login for each user in System Preferences->Users & Groups and this can be edited there.






                  share|improve this answer













                  This is working as designed.



                  which is a command line executable that looks on your path (and other parts of shell environment) to find things you can start from the command line



                  Applications like Safari (anything bundled as an application which will be a directory ending in .app with certain files in specific sub directories) are not launched from the command line. They are launched from the desktop and not via any shell commands.



                  You can however launch applications from the command line using the command open. man open gives details. The example to launch Safari is open -a Safari



                  Note that if you are trying to open Safari when you login putting this command in your shell files will not work as the shell is not run until you launch Terminal.app.

                  The easiest way to launch Safari at login is to run the app from the desktop, right click on the app's icon in the dock and choose Options then Open at Login.

                  There is also a list of things that are launched at login for each user in System Preferences->Users & Groups and this can be edited there.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 days ago









                  MarkMark

                  20.3k115795




                  20.3k115795





















                      3














                      On macOS applications aren‘t part of the standard PATH and can‘t be started by calling them from the command line (well, yes, they can, but it‘s not so easy). But you can use



                      open foo.html


                      or



                      open -a Safari


                      to start Safari from bash.






                      share|improve this answer



























                        3














                        On macOS applications aren‘t part of the standard PATH and can‘t be started by calling them from the command line (well, yes, they can, but it‘s not so easy). But you can use



                        open foo.html


                        or



                        open -a Safari


                        to start Safari from bash.






                        share|improve this answer

























                          3












                          3








                          3







                          On macOS applications aren‘t part of the standard PATH and can‘t be started by calling them from the command line (well, yes, they can, but it‘s not so easy). But you can use



                          open foo.html


                          or



                          open -a Safari


                          to start Safari from bash.






                          share|improve this answer













                          On macOS applications aren‘t part of the standard PATH and can‘t be started by calling them from the command line (well, yes, they can, but it‘s not so easy). But you can use



                          open foo.html


                          or



                          open -a Safari


                          to start Safari from bash.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 2 days ago









                          nohillsidenohillside

                          53.3k14112157




                          53.3k14112157





















                              2














                              Add following in your .bash_profile.



                              alias safari="/Applications/Safari.app/Contents/MacOS/Safari" 


                              You can now start safari in your Terminal. As mentioned before, .app are bundles and cannot start directly from Terminal.



                              To Edit your .bash_profile:



                              1. Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the pwd command. Usually /Users/Username.


                              2. add the alias Line above at the end of the document.


                              3. type CTRL-O to save the file

                              4. type CTRL-X to exit nano

                              5. type source .bash_profile to update

                              6. type safari to start Safari.

                              You can do this with most of the applications in the /Application-Folder.






                              share|improve this answer


















                              • 1





                                This is a very special case - I would think open is the better command unless you have a very special need.

                                – Mark
                                2 days ago















                              2














                              Add following in your .bash_profile.



                              alias safari="/Applications/Safari.app/Contents/MacOS/Safari" 


                              You can now start safari in your Terminal. As mentioned before, .app are bundles and cannot start directly from Terminal.



                              To Edit your .bash_profile:



                              1. Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the pwd command. Usually /Users/Username.


                              2. add the alias Line above at the end of the document.


                              3. type CTRL-O to save the file

                              4. type CTRL-X to exit nano

                              5. type source .bash_profile to update

                              6. type safari to start Safari.

                              You can do this with most of the applications in the /Application-Folder.






                              share|improve this answer


















                              • 1





                                This is a very special case - I would think open is the better command unless you have a very special need.

                                – Mark
                                2 days ago













                              2












                              2








                              2







                              Add following in your .bash_profile.



                              alias safari="/Applications/Safari.app/Contents/MacOS/Safari" 


                              You can now start safari in your Terminal. As mentioned before, .app are bundles and cannot start directly from Terminal.



                              To Edit your .bash_profile:



                              1. Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the pwd command. Usually /Users/Username.


                              2. add the alias Line above at the end of the document.


                              3. type CTRL-O to save the file

                              4. type CTRL-X to exit nano

                              5. type source .bash_profile to update

                              6. type safari to start Safari.

                              You can do this with most of the applications in the /Application-Folder.






                              share|improve this answer













                              Add following in your .bash_profile.



                              alias safari="/Applications/Safari.app/Contents/MacOS/Safari" 


                              You can now start safari in your Terminal. As mentioned before, .app are bundles and cannot start directly from Terminal.



                              To Edit your .bash_profile:



                              1. Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the pwd command. Usually /Users/Username.


                              2. add the alias Line above at the end of the document.


                              3. type CTRL-O to save the file

                              4. type CTRL-X to exit nano

                              5. type source .bash_profile to update

                              6. type safari to start Safari.

                              You can do this with most of the applications in the /Application-Folder.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered 2 days ago









                              dante12dante12

                              1,254512




                              1,254512







                              • 1





                                This is a very special case - I would think open is the better command unless you have a very special need.

                                – Mark
                                2 days ago












                              • 1





                                This is a very special case - I would think open is the better command unless you have a very special need.

                                – Mark
                                2 days ago







                              1




                              1





                              This is a very special case - I would think open is the better command unless you have a very special need.

                              – Mark
                              2 days ago





                              This is a very special case - I would think open is the better command unless you have a very special need.

                              – Mark
                              2 days ago



                              -command-line, macos, path, safari, terminal

                              Popular posts from this blog

                              Frič See also Navigation menuinternal link

                              Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant

                              fontconfig warning: “/etc/fonts/fonts.conf”, line 100: unknown “element blank” The 2019 Stack Overflow Developer Survey Results Are In“tar: unrecognized option --warning” during 'apt-get install'How to fix Fontconfig errorHow do I figure out which font file is chosen for a system generic font alias?Why are some apt-get-installed fonts being ignored by fc-list, xfontsel, etc?Reload settings in /etc/fonts/conf.dTaking 30 seconds longer to boot after upgrade from jessie to stretchHow to match multiple font names with a single <match> element?Adding a custom font to fontconfigRemoving fonts from fontconfig <match> resultsBroken fonts after upgrading Firefox ESR to latest Firefox