一、dekg 命令
root@wsl-VirtualBox:/home# dpkg --help
用法:dpkg [<选项> ...] <命令>
命令:
-i|--install <.deb 文件名> ... | -R|--recursive <目录> ...
--unpack <.deb 文件名> ... | -R|--recursive <目录> ...
-A|--record-avail <.deb 文件名> ... | -R|--recursive <目录> ...
--configure <软件包名> ... | -a|--pending
--triggers-only <软件包名> ... | -a|--pending
-r|--remove <软件包名> ... | -a|--pending
-P|--purge <软件包名> ... | -a|--pending
-V|--verify <软件包名> ... 检查包的完整性。
--get-selections [<表达式> ...] 把已选中的软件包列表打印到标准输出。
--set-selections 从标准输入里读出要选择的软件。
--clear-selections 取消选中所有不必要的软件包。
--update-avail <软件包文件> 替换现有可安装的软件包信息。
--merge-avail <软件包文件> 把文件中的信息合并到系统中。
--clear-avail 清除现有的软件包信息。
--forget-old-unavail 忘却已被卸载的不可安装的软件包。
-s|--status <软件包名> ... 显示指定软件包的详细状态。
-p|--print-avail <软件包名> ... 显示可供安装的软件版本。
-L|--listfiles <软件包名> ... 列出属于指定软件包的文件。
-l|--list [<表达式> ...] 简明地列出软件包的状态。
-S|--search <表达式> ... 搜索含有指定文件的软件包。
-C|--audit [<表达式> ...] 检查是否有软件包残损。
--yet-to-unpack 列出标记为待解压的软件包。
--predep-package 列出待解压的预依赖。
--add-architecture <体系结构> 添加 <体系结构> 到体系结构列表。
--remove-architecture <体系结构> 从架构列表中移除 <体系结构>。
--print-architecture 显示 dpkg 体系结构。
--print-foreign-architectures 显示已启用的异质体系结构。
--assert-<特性> 对指定特性启用断言支持。
--validate-<属性> <字符串> 验证一个 <属性>的 <字符串>。
--compare-vesions <a> <关系> <b> 比较版本号 - 见下。
--force-help 显示本强制选项的帮助信息。
-Dh|--debug=help 显示有关出错调试的帮助信息。
二、下载安装包但不安装
root@wsl-VirtualBox:/home# sudo apt download lsscsi
下载下来的目录在当前目录
三、下载安装并安装
root@wsl-VirtualBox:/home# sudo apt-get install lsscsi
下载的安装包目录:
root@wsl-VirtualBox:/home# ls /var/cache/apt/archives
apt_1.6.13_amd64.deb
apt-utils_1.6.13_amd64.deb
base-files_10.1ubuntu2.10_amd64.deb
dirmngr_2.2.4-1ubuntu1.4_amd64.deb
friendly-recovery_0.2.38ubuntu1.2_all.deb
四、手动安装已有的安装包
参考一
root@wsl-VirtualBox:/home/# sudo dpkg -i lsscsi_0.28-0.1_amd64.deb