Fedora package management tools dnf use Summary

what

In recent months tinker with several Linux distributions, such as domestic Deepin, as well as Debian 9/10, Germany opensuse, of course, is the fire also tried ubuntu,
installing archlinux without success ~~~ had installed manjaro , be seen all at arch Church ......
but when it comes to learning Linux, many domestic video tutorials are based on Centos is concerned, so also Centos 6/7 installed, feeling good
, however, we all know, is redhat Centos version of the open source community the main point is to force the server side, the core concern is stable. I love this stability as much as I love Debian, Ubuntu is better than
more, I have a little bit of demand for desktop side, who are willing to shell terminal every day against the dark it? So, then in my old computer to upload on Fedora!
In the end, then again, what do not release waste too much time on what desktop environment, down to earth, now, slowly study, by analogy is sought;
or less, records of use dnf.

Starting package management tools dnf

Specific basics of package management, please visit https://linux.cn/article-8782-1.html ;

Frequently used commands

##### 帮助
dnf help  # 查看所有的DNF命令及其用途
dnf help <command>  # 获取命令的使用帮助
dnf history  # 查看 DNF 命令的执行历史


##### 信息查看
dnf repolist  # 查看系统中可用的DNF软件库
dnf search <package>  # 搜索软件库中的RPM包

dnf list installed  # 列出所有安装的RPM包
dnf list available  # 列出所有可安装的RPM包
dnf info <package>  # 查看软件包详情

dnf provides <file>  # 查找某一文件的提供者


##### 软件包操作
dnf install <package>  # 安装软件包及其所需的所有依赖
dnf update <package>  # 升级软件包
dnf remove <package>  # 删除软件包
dnf reinstall <package>  # 重新安装特定软件包
dnf distro-sync  # 更新软件包到最新的稳定发行版
dnf autoremove # 删除所有不再需要的,当初作为软件安装依赖的包


##### 系统软件包
dnf check-update  # 检查系统所有软件包的更新
dnf update  # 升级所有系统软件包
dnf clean all  # 删除缓存的无用软件包

rpm use

dnf package as a management tool is very good, but there are some software is not available from the software warehouse. For example, I want to get a markdown editor typora, I can get .rpm file from its official website, for installation use.

rpm(选项)(参数)

-a:查询所有套件;
-b<完成阶段><套件档>+或-t <完成阶段><套件档>+:设置包装套件的完成阶段,并指定套件档的文件名称;
-c:只列出组态配置文件,本参数需配合"-l"参数使用;
-d:只列出文本文件,本参数需配合"-l"参数使用;
-e<套件档>或--erase<套件档>:删除指定的套件;
-f<文件>+:查询拥有指定文件的套件;
-h或--hash:套件安装时列出标记;
-i:显示套件的相关信息;
-i<套件档>或--install<套件档>:安装指定的套件档;
-l:显示套件的文件列表;
-p<套件档>+:查询指定的RPM套件档;
-q:使用询问模式,当遇到任何问题时,rpm指令会先询问用户;
-R:显示套件的关联性信息;
-s:显示文件状态,本参数需配合"-l"参数使用;
-U<套件档>或--upgrade<套件档>:升级指定的套件档;
-v:显示指令执行过程;
-vv:详细显示指令执行过程,便于排错。

Guess you like

Origin www.cnblogs.com/rookieagle/p/11520643.html