“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?Safari not loading pages, other browsers doing fineCannot 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?Strange “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
TGV timetables / schedules?
Is it possible to make sharp wind that can cut stuff from afar?
Why has Russell's definition of numbers using equivalence classes been finally abandonned? ( If it has actually been abandonned).
How can bays and straits be determined in a procedurally generated map?
How to get the available space of $HOME as a variable in shell scripting?
A function which translates a sentence to title-case
How old can references or sources in a thesis be?
N.B. ligature in Latex
Prevent a directory in /tmp from being deleted
Can a German sentence have two subjects?
"which" command doesn't work / path of Safari?
The use of multiple foreign keys on same column in SQL Server
Why Is Death Allowed In the Matrix?
GPS Rollover on Android Smartphones
Theorems that impeded progress
What is the offset in a seaplane's hull?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
How to make payment on the internet without leaving a money trail?
Infinite past with a beginning?
Why was the small council so happy for Tyrion to become the Master of Coin?
A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?
How to add power-LED to my small amplifier?
If Manufacturer spice model and Datasheet give different values which should I use?
What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?
“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?Safari not loading pages, other browsers doing fineCannot 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?Strange “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 3 hours 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 8 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
3 hours 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 4 hours ago
answered 6 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 6 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 6 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
3 hours 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
3 hours 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 5 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
3 hours 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
3 hours ago
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
3 hours ago
This is a very special case - I would think open is the better command unless you have a very special need.
– Mark
3 hours ago
add a comment |