`
MiseryCoder
  • 浏览: 11365 次
社区版块
存档分类
最新评论

apt-get update;apt-get upgrade;apt-get dist-upgrade各自的作用

阅读更多
apt-get command cheat sheet for Debian Linux

apt-get is the command-line tool for handling packages for Debian Linux which is use to:
Install/manage individual packages
Upgrade packages
Apply security patch(s)
Keep Debian system up to date
Download source .deb files
Front-end to many GUI and other utilities
Here is quick cheat sheet you will find handy while using apt-get at shell prompt:
Syntax Description Example(s)
apt-get install {package} Install the new package. If package is installed then try to upgrade to latest version apt-get install zip
apt-get install lsof samba mysql-client
apt-get remove {package} Remove/Delete an installed package except configuration files apt-get remove zip
apt-get --purge remove {package} Remove/Delete everything including configuration files apt-get --purge remove mysql-server
apt-get update
apt-get upgrade Resynchronize the package index files and Upgrade the Debian Linux system including security update (Internet access required) apt-get update
apt-get upgrade
apt-get update
apt-get dist-upgrade Usually use to upgrade to Debian distribution. For example Woody to Sarge upgrade. 'dist-upgrade' in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. apt-get update
apt-get dist-upgrade
{package} - Replace with actual package name


安装或升级系统分下面几个步骤。
第一步,获得最近的软件包的列表;列表中包含一些包的信息,比如这个包是否更新过。
第二步,如果这个包没有发布更新,就不管它;
            如果发布了更新,就把包下载到电脑上,并安装。

apt-get update对应的就是第一步。
apt-get upgrade 与apt-get dist-upgrade对应的是第二步。

由于包与包之间存在各种依赖关系。upgrade只是简单的更新包,不管这些依赖,它不和添加包,或是删除包。而dist-upgrade可以根据依赖关系的变化,添加包,删除包。

一般在运行upgrade或dist-upgrade之间,要运行update.
原文地址:http://www.cnblogs.com/lexus/archive/2011/11/30/2268896.html
分享到:
评论

相关推荐

    ubuntu命令大全

    #sudo apt-get dist-upgrade 清除所以删除包的残余配置文件 dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P编译时缺少h文件的自动处理 #sudo auto-apt run ./configure 查看安装软件时下载包的临时存放...

    Ubuntu命令大全

    #sudo apt-get dist-upgrade 清除所以删除包的残余配置文件 #dpkg -l |grep ^rc|awk ‘{print $2}’ |tr [”\n”] [” “]|sudo xargs dpkg -P - 编译时缺少h文件的自动处理 #sudo auto-apt run ./configure 查看...

    dionaea-honeypot:虚拟机Ubuntu服务器12.04 x64安装dionaea honeypot

    sudo apt-get dist-upgrade 吉卡·阿达·玛莎拉(Jika Ada Masalah) sudo rm -rf /var/lib/apt/lists/* sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade 安装特权sbb: sudo apt-get ...

    Ubuntu 源管理 && update upgrade dst-upgrade 区别

    文章目录源管理命令修改源为国内源apt的三种参数`update upgrade dist-upgrade`的区别 源管理命令 配置文件路径 /etc/apt/sources.list 添加仓库 add-apt-repository xxx 如add-apt-repository ppa:fcitx-team/...

    hl

    sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus sudo apt-get install build-essential ...

    zju_engineer_2018_summer:真正的机器人上的zju工程师练习

    sudo apt-get dist-upgrade sudo apt-get update sudo apt-get install ros-indigo-map-server sudo apt-get install ros-indigo-move-base sudo apt-get install ros-indigo-navigation 运行cd exercise_ec_ws进入...

    ubuntu 1604升级到ubuntu 1804无法忽视的细节问题(亲测有效)

    升级ubuntu系统,遇到很多问题,可能...sudo apt dist-upgrade 清理无用的软件 sudo apt-get remove 安装 update-manager-core sudo apt-get install update-manager-core 执行升级指令 sudo do-release-upgrade 不

    Marks-Pentest-Challenge:我为同学设置了Raspberry Pi上的小挑战

    sudo raspi-configsudo reboot更新所有内容以确保sudo apt-get updatesudo apt-get upgradesudo apt-get dist-upgrade安装必需品套件对于mysql,请选择与您的用户密码不同的root密码。 sudo apt-get install apache...

    winglevlr

    sudo apt-get -y dist-upgrade" vagrant halt vagrant up vagrant ssh -c "sudo apt-get install -y arduino git build-essential python-serial bash-completion gnuplot" vagrant ssh # Install homebrew

    PI_mediaServer:树莓派媒体服务器

    sudo apt-get update sudo apt-get dist-upgrade Vim(它是一个文本编辑器) sudo apt-get install vim passwd 将文件ssh添加到启动分区 curl -sSL https://get.docker.com | sh 在不使用sudo的情况下使用docker ...

    pi-weather:Playground 使用树莓派处理天气

    sudo apt-get dist-upgrade sudo apt-get autoclean sudo apt-get autoremove sudo rpi-update sudo reboot 使用weewx从气象站读取数据并生成html报告 本项目使用的硬件: 气象站 TE831X weewx支持的其他站: : ...

    cookbooks:厨师食谱

    apt-get dist-upgrade apt-get install ruby1.9.3 make git Ruby设置 设置~/.gemrc : echo "gem: --no-ri --no-rdoc" > ~/.gemrc gem install chef 安装 设置live: true dna.json 中的live: true chef-solo -c /...

    ubuntu-ibus-搜狗词库-非常全面-sougou-phrases-full.7z

    sudo apt-get dist-upgrade 下载词库 去https://code.google.com/p/hslinuxextra/downloads/list下载,提供的是 搜狗词库-非常全面,使用里面ibus文件夹下的android.db(158M) 进入/usr/share/ibus-pinyin/db,...

    bashrc

    alias update= " sudo apt-get update && sudo sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt autoremove -y " alias upgrade= " sudo apt install update-manager-core -y && sudo do-...

    Ubuntu Server 14.04升级Ubuntu Server 16.04

    $ sudo apt-get update && sudo apt-get dist-upgrade 2、重启系统以完成更新的安装 $ sudo init 6 3、用命令安装更新管理器核心update-manager-core,如果服务器已安装则可以跳过 $ sudo apt-get install update-...

    Learning

    获取最新Linux “ sudo apt-get更新”“ sudo apt-get -y dist-upgrade”可选:更改Root密码:sudo passwd root。 安装可视代码sudo apt-get update sudo apt-get install -y gnome-keyring 如果不确定您的...

    libwhp-sample:使用libwhp的完整Windows Hypervisor平台API Rust示例

    libwhp样本 使用完整Windows Hypervisor Platform API Rust示例。 先决条件 确保至少: Windows 10内部版本17134(或更高...wsl sudo apt-get dist-upgrade -y wsl sudo apt-get install gcc make binutils -y 最后但

    vps-wordpress-woo:在针对WordPress + WooCommerce进行了优化的服务器的7个步骤中进行安装

    apt-get update && apt-get upgrade && apt-get dist-upgrade 帕索2 wget -qO ee rt.cx/ee && sudo bash ee 帕索3 纳米/etc/ee/ee.conf [mysql] 在创建网站时询问MySQL数据库名称db-name =真 在创建网站时询问...

    Ubuntu-Server-Deploy

    Ubuntu 服务器部署 从 vmware 模板部署时,此脚本将设置初始配置设置。 用法 要下载脚本: ... sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade 安装 SSH 和 Git 以及您

Global site tag (gtag.js) - Google Analytics