WinRAR archiver uses RAR files as its native format. Other freeware and nagware archiving tools support RAR, too. The archiving format is becoming increasingly popular. Like the Gzip format, I personally would prefer not having to install yet another software component that wants to be my primary archiving tool. Below are some notes on how I configured Cygwin for cli access to working with RAR files. Please note these steps assume you have already installed Cygwin with gcc, make, and makedepend.
Download the source files for RAR 3.80 to your source folder (/usr/src or C:\cygwin\usr\src). Extract the source files, and remove the download.
$ cd /usr/src
$ gzip -d rarlinux-3.8.0.tar.gz
$ tar -xvf rarlinux-3.8.0.tar
$ rm rarlinux-3.8.0.tar
Compile the RAR source files using make. Once done. move the unrar.exe file to your binaries folder (/bin or C:\cygwin\bin).
$ cd /usr/src/rar
$ make -f makefile.cygmin
$ mv unrar.exe /bin/
That is it. From there on out, you can use the unrar command to extract any archives.
$ unrar e YourArchiveHere.rar
Enjoy,
Wolfgang
Edit 2012-03/11: The makefile for Cygwin is no longer included. Please download the UnRAR source for 4.1.4 and follow these steps.
$ cd /usr/src/
$ gzip -d unrarsrc-4.1.4.tar.gz
$ tar -xvf unrarsrc-4.1.4.tar
$ cd unrar
$ make -f makefile.unix
$ mv unrar.exe /bin
$ unrar e YourArchiveHere.rar