I am attempting to install Firefox on my Mac, which currently does not have a browser. From a bash terminal I have ftp
installed and am currently connected to the internet. However, I have been unsuccessful in connecting to their FTP server. How do I go about installing Firefox for my Mac via the command line?
2 Answers
You can skip the download step, and mount it directly over the internet like so:
hdiutil attach https://ftp.mozilla.org/pub/firefox/releases/43.0.4/mac/en-US/Firefox\ 43.0.4.dmg
Saves a step, time, and storage space!
-
-
It's one of those hidden gems that Apple sneaks in. I tried attaching directly over the internet like that many years back to see if it would work, and it actually did. Definitely a neat trick. ;) Of course, I realized afterwards that it's mentioned in the man page. Heh. Jan 16, 2016 at 22:00
-
You're mounting it over HTTP, which is pretty insecure. Does the command support HTTPS ? Jan 17, 2016 at 14:30
-
ftp access to ftp.mozilla.org was turned off (see this, thanks Davïd). However, you can use curl
from the command line:
curl 'https://ftp.mozilla.org/pub/firefox/releases/43.0.4/mac/en-US/Firefox%2043.0.4.dmg' >~/Desktop/'Firefox 43.0.4.dmg'
That gets the latest (as of this writing) US English release for Mac OS X of Firefox.
You can get a directory listing thusly:
curl 'https://ftp.mozilla.org/pub/firefox/releases/43.0.4/mac/'
That outputs HTML, but it's pretty simple HTML, so it shouldn't be a problem reading it to get a different language. You can also chop additional elements off the path, for example if you want a different version:
curl 'https://ftp.mozilla.org/pub/firefox/releases/'
http
protocol? See this Mozilla support issue.