Linux tips - How to extract rar file in Slackware

Slackware Linux does not include unrar in default installation. You need to install unrar manually to extract rar file. Go to Slackbuild website and search for unrar.

Download unrar source and unrar slackbuild scripts.

Slackbuild unrar download image

When the download finished, switch to Slackware command line terminal and login as root. You can also open root shell in kde. Click Start --> System --> More Applications --> Terminal Program - Super User Mode.

Copy or move unrar slackbuild script to the dedicated directory and extract it. You can see examples on how to do this in the Prepare Slackbuild environment tutorial for more information about slackbuild preparation.

[email protected]:~# cd /home/slackware/source/myslackware/
[email protected]:/home/slackware/source/myslackware# mv /home/luzar/Desktop/unrar.tar.gz .
[email protected]:/home/slackware/source/myslackware# tar zxvf unrar.tar.gz
unrar/
unrar/README
unrar/unrar.1.gz
unrar/unrar.info
unrar/slack-desc
unrar/unrar.SlackBuild
[email protected]:/home/slackware/source/myslackware#

Copy or move unrar source into the extracted unrar slackbuild directory:

[email protected]:/home/slackware/source/myslackware# cd unrar
[email protected]:/home/slackware/source/myslackware/unrar# mv /home/luzar/Desktop/unrarsrc-3.8.5.tar.gz .
[email protected]:/home/slackware/source/myslackware/unrar#

Run unrar slackbuild script:

[email protected]:/home/slackware/source/myslackware/unrar# ./unrar.SlackBuild

Change directory to /tmp and install the Slackware unrar package that we just created. You can also keep a copy of the package to use in the future.


[email protected]:/tmp# installpkg unrar-3.8.5-i486-1_SBo.tgz
Installing package unrar-3.8.5-i486-1_SBo...
PACKAGE DESCRIPTION:
unrar: unrar (unpacker for the RAR archive format)
unrar:
unrar: WinRAR is a powerful archive manager. Unrar is an opensource subset
unrar: of RAR from rarlab that can uncompress RAR images.
unrar:
unrar: unrar home: http://www.rarlab.com/rar_add.htm
unrar:

[email protected]:/tmp# cp unrar-3.8.5-i486-1_SBo.tgz /home/slackware/packages/
[email protected]:/tmp#

How to extract rar file

To extract rar file from command line terminal, you can use unrar e option to extract it to current directory. See example below:

[email protected]:~/work-area$ unrar e tdm-ob2-subtitles.rar

UNRAR 3.80 freeware Copyright (c) 1993-2008 Alexander Roshal

Extracting from tdm-ob2-subtitles.rar

Extracting tdm-ob2a.srt OK
Extracting tdm-ob2b.srt OK

tdm-ob2a.srt already exists. Overwrite it ?
[Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit y

Extracting tdm-ob2a.srt OK

tdm-ob2b.srt already exists. Overwrite it ?
[Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit y

Extracting tdm-ob2b.srt OK
All OK
[email protected]:~/work-area$

To extract rar file from kde or gnome, right-click rar file icon and choose Extract. Choose location for the extracted files. See example screenshot below:

Unrar file from kde screenshot image

That's all. Here is the result package of the example above if you don't have time to build one for yourself. However, www.basicconfig.com and the writer do not responsible for any harm done to your system. By using this package, you are agreed to the Web Site Agreement. Use it at your own risk.

Download Slackware 12.2 unrar-3.8.5-i486-1_SBo.tgz package.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.