How to Install Unrar in Termux on Android

Yes, the unrar utility can be installed and run natively on Android devices using the Termux terminal emulator. This guide provides a direct walkthrough of how to install the official package through the Termux package manager, configure local storage permissions, and use essential commands to extract RAR archives directly on your mobile device without needing root access.

Prerequisites

Before installing the utility, grant Termux permission to access your device's internal storage so you can work with downloaded archives:

termux-setup-storage

Accept the storage permission prompt that appears on your screen.

Installing Unrar

To install the native unrar package, open Termux and follow these steps:

  1. Update the local package repositories to the latest versions:

    pkg update && pkg upgrade -y
  2. Install the unrar package:

    pkg install unrar -y
  3. Verify the installation:

    unrar

    If successful, the terminal will display the UnRAR version information and a list of available commands.

How to Extract RAR Archives

Navigate to the directory containing your archive (such as your Downloads folder) using the cd command:

cd ~/storage/downloads

Use the following commands depending on how you want to unpack the files:

  • Extract with original directory structure (recommended):

    unrar x archive_name.rar
  • Extract all files into the current folder without subdirectories:

    unrar e archive_name.rar
  • View the contents of an archive without extracting:

    unrar l archive_name.rar
  • Extract a password-protected archive:

    unrar x -pYourPassword archive_name.rar

Alternative Method: Using 7-Zip

If you encounter unsupported archive formats or prefer an all-in-one archive manager, p7zip also handles RAR files natively in Termux:

  1. Install the package:

    pkg install p7zip -y
  2. Extract a RAR archive:

    7z x archive_name.rar