Download RARforLinux: http: wwwrarlabcom the downloaded file is a rarlinux-360targz, save it ~ Downloads directory 2 decompression package I want
1. download RAR for Linux
: Http://www.rarlab.com
The downloaded file is rarlinux-3.6.0.tar.gz and saved ~ /Downloads Directory
II. decompress the software package
I want to decompress the file to the/opt directory, but the/opt directory only has the write permission for the Super User.
[Songyadong @ walter downloads] $ su
Extract the tar command to the/opt directory and generate the rar directory in/opt.
[Root @ walter downloads] # tar xzvf rarlinux-3.6.0.tar.gz -- directory =/opt
3. create a symbolic link
View the/opt/rar directory and find that there are already two programs, rar and unrar, which can be used directly without compilation. for ease of use, create two symbolic connections in/usr/bin, and you can directly use the rar and unrar commands on the terminal.
[Root @ walter downloads] # ln-s/opt/rar/usr/bin/rar
[Root @ walter downloads] # ln-s/opt/rar/unrar/usr/bin/unrar
Note that the preceding two commands must also be executed by the Super User. after the operation is completed, exit the Super User. if you do not use the preceding concatenation symbol, you can add the rar command to the environment variable.
The procedure is as follows:
> PATH = $ PATH:/opt/rar
> Export PATH
Note:When adding a PATH, you must add a PATH after PATH = $ PATH. Otherwise, the system's environment variables will be damaged.