Nowadays, the use of compressed files facilitates the sending or transport of large information, but in a compressed format which saves space, and thanks to the various integrated functionalities of compression solutions it will be possible to protect this type of compressed files with Various methods of encryption ..
Although it is a very popular format and available for modern operating systems, in the case of Ubuntu distributions we can notice that the system file manager does not support the extraction of RAR files nor does it allow us to create RAR files, if we try to extract the content The following error message will be displayed:
In order to enable support for the optimal extraction of RAR files, it will be necessary to install UNRAR, which is an application developed by RARLAB, and if the objective is the creation and administration of RAR files, it will be necessary to install RAR, which It is available as evidence at this time.
TechnoWikis will explain how to install and use UNRAR in Ubuntu 18.04 and in this way have the best control over compressed files in RAR format..
1. How to install UnRAR on Ubuntu
To start the process, we must access the terminal in Ubuntu 18 and execute the following command:
sudo apt install unrar
UnRAR consists of commands and options for managing RAR files, the basic usage syntax is as follows:
unrar <command> - <switch 1> - <switch N> <file> <extraction path>
Now we will see all the available parameters with commands in the terminal.
The parameters available at the command level are:
and
Extract the files without their hosting path.
l & # 91
, b] '] List the contents of the compressed file.
v & # 91
, b] '] List the files in Verbose mode.
x
Extract the files with the full path.
Now, at the switch level we have the following options:
-:
Stops switch scanning.
@ & # 91
'] Disable or enable file list.
ad
Attach the name of the destination route.
ag & # 91
'] Generate a file using the current name.
ai
Ignore file attributes.
ap
Set the path inside the file.
c -
Disable comment view.
cfg -
Disable read settings.
cl
Convert names to lowercase.
cu
Convert names to uppercase.
ep3
Expand the routes including the drive letter.
id & # 91
'] Disable messages.
ierr
Send all messages to stderr
inul
Disable all messages.
kb
Extract damaged files.
n
Includes filters to the files.
n @
Read additional filter masks.
or
Rename files automatically.
ow
Save or restore the owner and group of a file.
p & # 91
'] Set a password.
p -
No password required.
r
Subdirectories of resources.
sl
Process files smaller than indicated.
Ye
Process files larger than indicated.
ta
Process modified files after the indicated date.
tb
Process modified files before the indicated date.
see & # 91
'] Controls the total version of the file.
Y
Apply Yes to all messages displayed.
2. How to unzip RAR file with UnRAR in Ubuntu
Remember that to see what a .RAR file contains in Ubuntu and Linux by commands, we must execute the following:
unrar -v filename.rar unrar -l filename.rar
To extract and decompress a RAR file we have two options:
Option 1
The first consists of the graphical mode of Ubuntu, right click on the tablet and select the option "Extract here" and we will see a message indicating that the task was completed correctly:
Option 2
The second option to use is directly from the terminal, for this we must execute the following syntax:
unrar x File.rar
Note
To make use of this option we must be in the directory where the RAR file is located.
We can see that all the contents of the file are extracted:
3. How to compress RAR files in Ubuntu
Recall that for the creation and management of RAR files we must install the RAR utility, this is accomplished by executing the following:
sudo apt install rar
By default, RAR files reside in the HOME directory. To create a RAR file we must execute the following syntax:
rar to File_Name File_1 File_2
As we can see, the files that were added to the RAR file are indicated.
Thus, both UNRAR and RAR are two useful tools for managing and accessing compressed files in Ubuntu environments where by default the opening and administration of these is restricted, with these two simple tools which integrate the best options to handle RAR files. task will no longer be an impediment and we can access the content of each RAR file in Ubuntu..