curl -L "https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US" -o Firefox.dmg Use code with caution. osx Parameter Customization
To download Firefox using curl , you must use the -L (or --location ) flag because Mozilla's URLs use redirects. You should also use the -o (lowercase) or -O (uppercase) flag to save the output to a file instead of displaying it in the terminal. 1. Download for Linux (64-bit) Use this command to get the latest .tar.bz2 archive:
Mozilla uses a dynamic redirection service at . This URL always points to the latest stable release of Firefox, so you don’t have to manually update your scripts with version numbers. firefox download curl
curl -L "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US" | tar -xj Use code with caution. Troubleshooting If the download fails, verify the following: Firefox releases README - mozilla.org
Using to download Firefox is a highly efficient method for system administrators, developers, and power users who prefer the command line over a graphical interface. Whether you are automating a server setup or simply want a scriptable way to grab the latest browser version, Mozilla provides dedicated download endpoints designed for tools like curl . The Master Download URL curl -L "https://download
The basic structure of the download URL is: https://download.mozilla.org/?product=firefox-latest&os=[OS]&lang=[LANG] Quick Start Commands
curl -L "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US" -o firefox-latest.tar.bz2 Use code with caution. linux64 Default File Format: .tar.bz2 2. Download for Windows (64-bit) To download the standard .exe installer: curl -L "https://mozilla.org" -o FirefoxSetup.exe Use code with caution. Operating System Key: win64 3. Download for macOS This will retrieve the .dmg or .pkg installer: firefox download curl
You can tailor your curl command by changing the parameters in the URL: Description firefox-latest , firefox-esr-latest Standard vs. Extended Support Release os win , win64 , osx , linux , linux64 Choose your target platform lang en-US , fr , de , es-ES , etc. Select your preferred language Advanced Tips for Power Users