当前位置:网站首页>apt的学习
apt的学习
2022-07-19 08:38:00 【苹榆枫】
一、介绍
apt-get命令本身并不具有管理软件包功能,只是提供了一个软件包管理的命令行平台。
在这个平台上使用更丰富的子命令,完成具体的管理任务。
apt-get命令的一般语法格式为:
apt-get subcommands [ -d | -f | -m | -q | --purge | --reinstall | - b | - s | - y | - u | - h | -v ] [pkg]
apt-cache提供了搜索功能。
说明:下文命令中,尖括号中内容为用户视具体情况而定,如可替换为实际的软件包名 mysql-server等。
标题(一) 更新或升级操作
apt-get update # 更新源
apt-get upgrade # 更新所有已安装的包
apt-get dist-upgrade # 发行版升级(如,从10.10到11.04)
标题(二)安装或重装类操作
apt-get install <pkg> # 安装软件包<pkg>,多个软件包用空格隔开
apt-get install --reinstall <pkg> # 重新安装软件包<pkg>
apt-get install -f <pkg> # 修复安装(破损的依赖关系)软件包<pkg>
标题(三)卸载类操作
apt-get remove <pkg> # 删除软件包<pkg>(不包括配置文件)
apt-get purge <pkg> # 删除软件包<pkg>(包括配置文件)
标题(四)下载清除类操作
apt-get source <pkg> # 下载pkg包的源代码到当前目录
apt-get download <pkg> # 下载pkg包的二进制包到当前目录
apt-get source -d <pkg> # 下载完源码包后,编译
apt-get build-dep <pkg> # 构建pkg源码包的依赖环境(编译环境?)
apt-get clean # 清除缓存(/var/cache/apt/archives/{,partial}下)中所有已下载的包
apt-get autoclean # 类似于clean,但清除的是缓存中过期的包(即已不能下载或者是无用的包)
apt-get autoremove # 删除因安装软件自动安装的依赖,而现在不需要的依赖包
标题(五)查询类操作
apt-cache stats # 显示系统软件包的统计信息
apt-cache search <pkg> # 使用关键字pkg搜索软件包
apt-cache show <pkg_name> # 显示软件包pkg_name的详细信息
apt-cache depends <pkg> # 查看pkg所依赖的软件包
apt-cache rdepends <pkg> # 查看pkg被那些软件包所依赖
标题(六)获取安装包
默认的缓存目录是
/var/cache/apt/archives/
边栏推荐
- flinkcdc同步数据SqlServer到mysql的时候,时间戳XDBMASK在SqlServe
- SylixOS TCP 数据段发送流程简述
- 【小程序】小游戏到底是个啥?
- Before autumn recruitment, you must read these 8 papers on the recommendation system! [attach thesis materials]
- Mathematics learning in Xinao: video collection of mathematics in primary school, junior high school and senior high school
- oracle 19c版本中, LogMiner包Continuous_mine功能过时,导致CDC功
- Three layer switching technology
- ES6 exercise
- PriorityQueue -- priority queue (heap)
- 【附下载】爆破神器之超级弱口令检查工具使用
猜你喜欢
Virtual exhibition combines AI digital people to help enterprises solve the current dilemma
[postponed to December] 2022 International Symposium on Cyber Security (csw2022)
【通信】【2】《宽带太赫兹通信技术》的笔记和一些简单的词汇的意思(误
【深度学习】pytorch使用tensorboard可视化实验数据
Synoxos TCP data segment sending process
[applet] what is a small game?
Vs2017 opencv3.4.2 is compiled into x86 through the release version source code
51单片机之LED灯
SylixOS TCP 数据段发送流程简述
【2022】【论文笔记】太赫兹波在非磁化等离子体中的——
随机推荐
Rotation of rectangular coordinate system
Solution: the configuration and path are completely correct, but the gateway cannot be accessed
JUC_synchronized关键字详解
KVM deployment and Application
Understand 25 neural network models - typical models of artificial neural networks
亚马逊、Lazada、Shopee、速卖通、eBay、Wish测评自养号运营知识——环境搭建技术详解
IPv6 basic
What network models does neural network include? Basic principles of neural network model
Pyqt5 learning resource preparation and environment configuration
P1087 [noip2004 popularity group question 3] FBI tree
SPEC2006详细参数和测试过程常见问题处理总结(附实例操作)
[applet] what is a small game?
Summary of database optimization methods and problems
phpcms添加多文本属性字段_详细教程
The Permutation Results by backtracking method (dfs)
[golang learning notes 1.7] functions in golang should be used
oracle 19c版本中, LogMiner包Continuous_mine功能过时,导致CDC功
A good product needs "emotional value"
Science animation, etc
Common construction methods and example appreciation of STL pair