Hello, fellow primates! Welcome back to the jungle of archive files. If you’re going bananas over big RAR files, let’s peel them open for you! Using the command line to extract RAR files is as easy as peeling a banana. So, let’s stop monkeying around and get started!
Table of contents
- Method 1: Extract RAR Files Using Command Line
- Method 2: Extract RAR Files Recursively Using Command Line
- Method 3: Extract Files to a Different Folder Using Command Line
- Method 4: List Contents of a RAR File Without Extracting Using Command Line
- Method 5: Extract a Specific File from a RAR File Using Command Line
- Method 6: Extract Multi-Part RAR Files Using Command Line
Video guide showing how to extract rar files on the command line (terminal).
How To Extract RAR Files Using Command Line
Extracting RAR files on Linux is just as easy. Here’s how you do it:
-
Install UnRAR: First, you need to install UnRAR. It’s like getting the right tool to peel your banana. Follow the installation instructions below.
On MacOS type the following command into terminal (you will need Homebrew installed on your system):brew install rar
On Linux:
sudo apt-get install unrar
-
Open Terminal on Directory: Open up your file manager and find the directory where your rar archive is located. Click the three dots and click on (Open in terminal). It’s like the tree where all the magic happens.
-
Extract Command: Type
unrar x yourfile.rar
This is the magic spell that peels the banana. Replace ‘yourfile’ with the name of the RAR file you want to extract.
How To Extract RAR Files Recursively Using Command Line
Got a whole tree of RAR files to extract? No problem!
-
Open Terminal on Directory: Open up your file manager and find the directory where your rar archive is located. Click the three dots and click on (Open in terminal). It’s like the tree where all the magic happens.
-
Extract Command: Type
unrar x -r yourfile.rar
The -r switch is the magic spell that extracts all the files in your RAR file and its subfolders.
How To Extract Files to a Different Folder Using Command Line
Want to peel your banana in a different tree? Here’s how you do it:
-
Open Terminal on Directory: Open up your file manager and find the directory where your rar archive is located. Click the three dots and click on (Open in terminal). It’s like the tree where all the magic happens.
-
Extract Command: Type
unrar x yourfile.rar /path/to/directory
The /path/to/directory is the magic spell that peels your banana in a different tree.
How To List Contents of a RAR File Without Extracting Using Command Line
Want to count your bananas without peeling them? Here’s how you do it:
-
Open Terminal on Directory: Open up your file manager and find the directory where your rar archive is located. Click the three dots and click on (Open in terminal). It’s like the tree where all the magic happens.
-
List Command: Type
unrar l yourfile.rar
This is the magic spell that lets you count your bananas without peeling them.
How To Extract a Specific File from a RAR File Using Command Line
Need just one banana from the bunch? Here’s how you do it:
-
Open Terminal on Directory: Open up your file manager and find the directory where your rar archive is located. Click the three dots and click on (Open in terminal). It’s like the tree where all the magic happens.
-
Extract Command: Type
unrar e yourfile.rar yourspecificfile
Replace ‘yourspecificfile’ with the name of the file you want to extract. This is the magic spell that gets you just the banana you want.
How To Extract Multi-Part RAR Files Using Command Line
Got a big bunch of bananas split into multiple parts? Here’s how you extract them:
-
Open Terminal on Directory: Open up your file manager and find the directory where your rar archive is located. Click the three dots and click on (Open in terminal). It’s like the tree where all the magic happens.
-
Extract Command: Type
unrar x yourfile.part1.rar
This is the magic spell that gathers all the parts of your banana bunch and extracts them.
Remember, with the command line, you’re the master of the jungle! Happy unrarring!