In this brief guide we will enlighten users with the commands needed for extracting RAR files via the terminal in Ubuntu 11.10 Oneiric Ocelot. As you know, RAR is a proprietary file format for archiving and compressing computer data.
If you have downloaded RAR files under Ubuntu and want to extract them, you need first to install in your system the "unrar" tool. To do so, open the terminal (Ctrl+Alt+T) and install the unrar tool with this command:
sudo apt-get install unrar
If you want first to view the contents of the rar file before extracting it, use this command:
unrar l file.rar
Replace "file.rar" with your own rar file name.
To extarct the contents of a RAR file in the current directory, cd where it is located and run this command:
unrar e file.rar
To extarct the rar file with full path, use this command:
unrar x file.rar
For more help about using the "unrar" tool, issue this command from the terminal: