Installing GUnrar on Windows, macOS, and Linux: Step-by-Step Tutorial

Installing GUnrar on Windows, macOS, and Linux: Step-by-Step Tutorial

GUnrar is a command-line tool for extracting RAR archives. Below are concise, platform-specific installation and basic usage steps so you can start extracting RAR files quickly.

Windows

  1. Download

    • Visit the official GUnrar release page or a trusted mirror and download the Windows binary (usually named like gunrar-x.y.z-win64.zip).
  2. Extract and place executable

    • Unzip the downloaded archive.
    • Move gunrar.exe (or the provided executable) to a folder such as C:\Program Files\GUnrar</code>.
  3. Add to PATH

    • Press Windows key, search “Environment Variables” → “Edit the system environment variables”.
    • Click “Environment Variables…” → under System variables select Path → Edit → New → add C:\Program Files\GUnrar</code>.
    • Click OK to save.
  4. Verify

    • Open Command Prompt and run:

      Code

      gunrar –version
    • You should see version info.
  5. Basic usage

    • Extract to current directory:

      Code

      gunrar x archive.rar
    • Extract to specific folder:

      Code

      gunrar x archive.rar C:\path\to\folder

macOS

  1. Install via Homebrew (recommended)

    • If you don’t have Homebrew, install it from https://brew.sh.
    • Install GUnrar:

      Code

      brew install gunrar
  2. Or install from binary/source

    • Download macOS release, extract, and move the gunrar binary to /usr/local/bin/ (requires sudo).
  3. Verify

    • In Terminal, run:

      Code

      gunrar –version
  4. Basic usage

    • Extract:

      Code

      gunrar x archive.rar
    • Extract to folder:

      Code

      gunrar x archive.rar /Users/you/Downloads/

Linux (Debian/Ubuntu, Fedora, Arch)

  1. Debian/Ubuntu (APT)

    • There may be unrar packages available; if a gunrar package exists via your distro or third-party repo, prefer that. To install unrar as an alternative:

      Code

      sudo apt update sudo apt install unrar
    • For a GUnrar binary, download the Linux release, then:

      Code

      tar -xzf gunrar-x.y.z-linux.tar.gz sudo mv gunrar /usr/local/bin/ sudo chmod +x /usr/local/bin/gunrar
  2. Fedora (dnf)

    • Install unrar if GUnrar package is not available:

      Code

      sudo dnf install unrar
  3. Arch Linux

    • Check AUR for gunrar or use unrar:

      Code

      paru -S unrar
  4. Verify

    • Run:

      Code

      gunrar –version
  5. Basic usage

    • Extract:

      Code

      gunrar x archive.rar
    • Extract to folder:

      Code

      gunrar x archive.rar /path/to/folder/

Tips and Troubleshooting

  • Permission errors: ensure the binary is executable (chmod +x) and you have write permission for the destination folder.
  • If gunrar isn’t found after adding to PATH, restart the terminal or log out and back in.
  • If a distro lacks an official GUnrar package, unrar is a widely-used alternative with compatible commands (unrar x archive.rar).
  • For password-protected archives:

    Code

    gunrar x -pPASSWORD archive.rar

    (Replace PASSWORD with the actual password. Be cautious exposing passwords in shell history; prefer interactive prompts when supported.)

Example: Batch extraction script (Linux/macOS)

Save as extractall.sh:

bash

#!/bin/bash mkdir -p extracted for f in.rar; do gunrar x $f extracted/ done

Make executable and run:

Code

chmod +x extract_all.sh ./extract_all.sh

That’s it — you should now be able to install and use GUnrar across Windows, macOS, and Linux.

Comments

Leave a Reply