1 使用apt-cache命令查找包
zhai@zhai:~/Downloads$ apt-cache search rar | grep rar
rar - Archiver for .rar files
unrar - Unarchiver for .rar files (non-free version)
2 使用apt-get install安装
zhai@zhai:~/Downloads$ sudo apt-get install rar
[sudo] password for zhai:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
unrar
The following NEW packages will be installed:
rar
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 587 kB of archives.
After this operation, 1,657 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/multiverse amd64 rar amd64 2:5.3.b2-1 [587 kB]
Fetched 587 kB in 3s (180 kB/s)
Selecting previously unselected package rar.
(Reading database ... 241960 files and directories currently installed.)
Preparing to unpack .../rar_2%3a5.3.b2-1_amd64.deb ...
Unpacking rar (2:5.3.b2-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up rar (2:5.3.b2-1) ...
zhai@zhai:~/Downloads$ which rar
/usr/bin/rar
zhai@zhai:~/Downloads$ which unrar
zhai@zhai:~/Downloads$ sudo apt-get install unrar
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
unrar
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 123 kB of archives.
After this operation, 310 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/multiverse amd64 unrar amd64 1:5.3.2-1 [123 kB]
Fetched 123 kB in 3s (38.8 kB/s)
Selecting previously unselected package unrar.
(Reading database ... 241974 files and directories currently installed.)
Preparing to unpack .../unrar_1%3a5.3.2-1_amd64.deb ...
Unpacking unrar (1:5.3.2-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up unrar (1:5.3.2-1) ...
update-alternatives: using /usr/bin/unrar-nonfree to provide /usr/bin/unrar (unrar) in auto mode
zhai@zhai:~/Downloads$ which unrar
/usr/bin/unrar
3 解压缩
zhai@zhai:~/Downloads$ unrar e google-chrome-stable_current_amd64.rar
UNRAR 5.30 beta 2 freeware Copyright (c) 1993-2015 Alexander Roshal
Extracting from google-chrome-stable_current_amd64.rar
Extracting google-chrome-stable_current_amd64.deb OK
All OK
4 man
NAME
unrar - extract files from rar archives
SYNOPSIS
unrar <command> [-<switch 1> -<switch N>] archive [files...] [path...]
DESCRIPTION
This manual page documents briefly the unrar command.
This manual page was written for the Debian GNU/Linux distribution because the original program does
not have a manual page.
Commands and options described here are as of unrar 2.02.
OPTIONS
After the program name comes a command and then optional switches with dashes before them. A sum‐
mary of commands is included below. For a complete description, run unrar without options.
e Extract files to current directory.
l List archive content.
p Print file to stdout.
t Test archive files.
v Verbosely list archive.
x Extract files with full path.
还没有评论,来说两句吧...