網站首頁 編程語言 正文
apt-get全稱Advanced Package Tool
,是一款適用于Unix和Linux系統的高級包管理器。主要用于自動從互聯網的軟件倉庫中搜索、安裝、升級、卸載軟件或操作系統。
使用apt的主流Linux系統包括Debian和Ubuntu變異版本。
1、apt-get\apt-cache
apt-get命令一般需要root權限執行,一般跟著sudo命令。
apt 命令 | 命令的功能 |
---|---|
sudo apt-get update | 更新源 |
sudo apt-get install package | 安裝包 |
sudo apt-get install package --reinstall | 重新安裝包 |
sudo apt-get remove package | 刪除包 |
sudo apt-get -f install | 修復安裝 |
sudo apt-get remove package --purge | 刪除包,包括配置文件等 |
sudo apt-get build-dep package | 安裝相關的編譯環境 |
sudo apt-get upgrade | 更新已安裝的包 |
sudo apt-get dist-upgrade | 升級系統 |
sudo apt-get source package | 下載該包的源代碼 |
sudo apt-get clean && sudo apt-get autoclean | 清理無用的包 |
sudo apt-get check | 檢查是否有損壞的依賴 |
sudo apt-cache search package | 搜索軟件包 |
sudo apt-cache show package | 獲取包的相關信息,如說明、大小、版本等 |
sudo apt-cache depends package | 了解使用該包依賴那些包 |
sudo apt-cache rdepends package | 查看該包被哪些包依賴 |
2、apt
apt = apt-get、apt-cache 和?apt-config
?中最常用命令選項的集合。apt 可以看作 apt-get 和 apt-cache 命令的子集, 可以為包管理提供必要的命令選項。
作為普通用戶,還是應該首先使用 apt。
3、apt和apt-get命令之間的區別
雖然 apt 與 apt-get 有一些類似的命令選項,但它并不能完全向下兼容 apt-get 命令。也就是說,可以用 apt 替換部分 apt-get 系列命令,但不是全部。
apt 命令 | 取代的命令 | 命令的功能 |
---|---|---|
apt install | apt-get install | 安裝軟件包 |
apt remove | apt-get remove | 移除軟件包 |
apt purge | apt-get purge | 移除軟件包及配置文件 |
apt update | apt-get update | 刷新存儲庫索引 |
apt upgrade | apt-get upgrade | 升級所有可升級的軟件包 |
apt autoremove | apt-get autoremove | 自動刪除不需要的包 |
apt full-upgrade | apt-get dist-upgrade | 在升級軟件包時自動處理依賴關系 |
apt search | apt-cache search | 搜索應用程序 |
apt show | apt-cache show | 顯示安裝細節 |
當然,apt 還有一些自己的命令:
新的apt命令 | 命令的功能 |
---|---|
apt list | 列出包含條件的包(已安裝,可升級等) |
apt edit-sources | 編輯源列表 |
需要大家注意的是:apt 命令也還在不斷發展, 因此,你可能會在將來的版本中看到新的選項。
原文鏈接:https://www.cnblogs.com/springsnow/p/12651998.html
相關推薦
- 2022-09-16 Pandas統計計數value_counts()的使用_python
- 2022-01-15 跨域系列之proxy代理,解決跨域的方法之一
- 2022-04-24 Python大數據用Numpy?Array的原因解讀_python
- 2024-07-14 關于Module中在junit測試方法和非測試方法中獲取相對路徑不一致的問題
- 2022-03-31 C語言與C++項目實現相互調用_C 語言
- 2023-07-08 qt打開項目缺少ui_文件,使用手動生成
- 2022-06-21 python繪制帶有色塊的折線圖_python
- 2022-05-12 Kotlin 接口 interface 默認實現了open。并且可以提供默認實現
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支