“which” command doesn't work / path of Safari?Safari blocks all UK websites?Is there a way to copy the link URL in Safari (Mac OS X) without using right click?Cannot connect to Linked In on Chrome or Safari on OS-X SSL IssueIn 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?Safari can't verify the identity of the website errorsStrange “open with” option in SafariSafari history disappears despite settingsChanged my PATH to have /usr/local/bin ahead of /usr/bin and now pip isn't foundWeird issue with Safari and some of my web services
How can bays and straits be determined in a procedurally generated map?
How old can references or sources in a thesis be?
If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?
Why Is Death Allowed In the Matrix?
Can I interfere when another player is about to be attacked?
How to re-create Edward Weson's Pepper No. 30?
Magento 2: Admin panel 3 level menu structure not working
A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?
How is it possible to have an ability score that is less than 3?
Why don't electron-positron collisions release infinite energy?
XeLaTeX and pdfLaTeX ignore hyphenation
Is it possible to make sharp wind that can cut stuff from afar?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Prevent a directory in /tmp from being deleted
What typically incentivizes a professor to change jobs to a lower ranking university?
Why linear maps act like matrix multiplication?
Why does Kotter return in Welcome Back Kotter?
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
N.B. ligature in Latex
How to write a macro that is braces sensitive?
The use of multiple foreign keys on same column in SQL Server
Email Account under attack (really) - anything I can do?
strToHex ( string to its hex representation as string)
Why has Russell's definition of numbers using equivalence classes been finally abandonned? ( If it has actually been abandonned).
“which” command doesn't work / path of Safari?
Safari blocks all UK websites?Is there a way to copy the link URL in Safari (Mac OS X) without using right click?Cannot connect to Linked In on Chrome or Safari on OS-X SSL IssueIn 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?Safari can't verify the identity of the website errorsStrange “open with” option in SafariSafari history disappears despite settingsChanged my PATH to have /usr/local/bin ahead of /usr/bin and now pip isn't foundWeird issue with Safari and some of my web services
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
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
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.
add a comment |
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
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.
add a comment |
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
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.
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
macos terminal safari command-line path
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.
edited 16 mins 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 5 hours ago
RethliopuksRethliopuks
1133
1133
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.
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
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 Google Chrome.app is an application, the chrome binary is not usually added to the $PATH because it is not a command line tool — if you just run chrome 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. 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.
add a comment |
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.
add a comment |
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.
add a comment |
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:
Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the
pwdcommand. Usually/Users/Username.add the alias Line above at the end of the document.
- type CTRL-O to save the file
- type CTRL-X to exit nano
- type
source .bash_profileto update - type safari to start Safari.
You can do this with most of the applications in the /Application-Folder.
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
10 mins ago
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 Google Chrome.app is an application, the chrome binary is not usually added to the $PATH because it is not a command line tool — if you just run chrome 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. 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.
add a comment |
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 Google Chrome.app is an application, the chrome binary is not usually added to the $PATH because it is not a command line tool — if you just run chrome 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. 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.
add a comment |
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 Google Chrome.app is an application, the chrome binary is not usually added to the $PATH because it is not a command line tool — if you just run chrome 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. 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.
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 Google Chrome.app is an application, the chrome binary is not usually added to the $PATH because it is not a command line tool — if you just run chrome 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. 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.
edited 1 hour ago
answered 3 hours ago
grg♦grg
138k25219322
138k25219322
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered 3 hours ago
MarkMark
20.2k115795
20.2k115795
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered 3 hours ago
nohillside♦nohillside
53.3k14112157
53.3k14112157
add a comment |
add a comment |
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:
Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the
pwdcommand. Usually/Users/Username.add the alias Line above at the end of the document.
- type CTRL-O to save the file
- type CTRL-X to exit nano
- type
source .bash_profileto update - type safari to start Safari.
You can do this with most of the applications in the /Application-Folder.
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
10 mins ago
add a comment |
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:
Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the
pwdcommand. Usually/Users/Username.add the alias Line above at the end of the document.
- type CTRL-O to save the file
- type CTRL-X to exit nano
- type
source .bash_profileto update - type safari to start Safari.
You can do this with most of the applications in the /Application-Folder.
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
10 mins ago
add a comment |
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:
Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the
pwdcommand. Usually/Users/Username.add the alias Line above at the end of the document.
- type CTRL-O to save the file
- type CTRL-X to exit nano
- type
source .bash_profileto update - type safari to start Safari.
You can do this with most of the applications in the /Application-Folder.
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:
Type in Terminal nano .bash_profile (make sure your are in your home-directory test it with the
pwdcommand. Usually/Users/Username.add the alias Line above at the end of the document.
- type CTRL-O to save the file
- type CTRL-X to exit nano
- type
source .bash_profileto update - type safari to start Safari.
You can do this with most of the applications in the /Application-Folder.
answered 2 hours ago
dante12dante12
1,244512
1,244512
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
10 mins ago
add a comment |
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
10 mins ago
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
10 mins ago
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
10 mins ago
add a comment |