unrar command is a Linux utility tool used to extract files from RAR archives. It is used to unpack, extract, and decompress RAR files. RAR is a file format used for data compression and archiving. The
unrar utility tool is used to extract files from these archives for use in other applications.
To use the
unrar command, open a terminal and enter the following command:
unrar x archive.rar
This command will extract all files from the RAR archive named
archive.rar into the current working directory.
Specific Use Cases
- To extract a single file from a RAR archive, use the command:
unrar e archive.rar file.txt
This command will extract the file named
file.txt from the RAR archive
- To extract files from a RAR archive into a specific directory, use the command:
unrar x archive.rar /path/to/directory/
This command will extract all files from the RAR archive
archive.rar into the directory
- To extract files from a password-protected RAR archive, use the command:
unrar x -pPASSWORD archive.rar
This command will extract all files from the password-protected RAR archive
PASSWORD with the actual password for the archive.
unrar command has several options that can be used to modify the behavior of the command. The following table lists all available options for this command:
||Extract files from the archive|
||Extract files without preserving directory structure|
||Specify a password for password-protected archives|
||Assume Yes to all queries|
- If you receive an error message stating that the
unrarcommand is not found, you may need to install the
unrarpackage. You can install it using the following command:
sudo apt-get install unrar
- If you are having trouble extracting files from a RAR archive, make sure that you are using the correct password if the archive is password-protected.
unrarcommand is not included in some Linux distributions by default. You may need to install it separately.
unrarcommand can only be used to extract files from RAR archives. To create RAR archives, you will need to use a different tool, such as