ubuntu sudo apt-get upgrade 和 sudo apt-get dist-upgrade区别

sudo apt-get upgrade: 不会对系统产生重大的影响,可以在任何时候运行。

sudo apt-get dist-upgrade: 涉及核心的升级,通常会对系统功能产生实际的影响,可能在需要的情况下卸载一些已经安装的软件也可能安装一些额外的软件,通常应该谨慎操作,特别是有未完成的工作,但是在允许的情况下应该尽力升级,应为可能涉及一些重大的核心升级,比如安全。

dist-upgrade will perform updates to software that makes actual changes to the system and can have an impact on the functionality of your system. Using ubuntu, a dist-upgrade often involves kernel upgrades. Kernel upgrades can really change things, especially if you have manually installed proprietary drivers. If you are currently working on a project for school or work, it is best to wait until the project is finished before performing a dist-upgrade. You can safely perform an upgrade at any time and it will not have a large impact on system functionality. You should, however, perform a dist-upgrade whenever possible as there are often security updates for the kernel. Also, a dist-upgrade may uninstall existing packages or install extra packages where an upgrade will not.

upgrade
   upgrade is used to install the newest versions of all packages
   currently installed on the system from the sources enumerated in
   /etc/apt/sources.list. Packages currently installed with new
   versions available are retrieved and upgraded; under no
   circumstances are currently installed packages removed, or packages
   not already installed retrieved and installed. New versions of
   currently installed packages that cannot be upgraded without
   changing the install status of another package will be left at
   their current version. An update must be performed first so that
   apt-get knows that new versions of packages are available.

dist-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. So, dist-upgrade
   command may remove some packages. The /etc/apt/sources.list file
   contains a list of locations from which to retrieve desired package
   files. See also apt_preferences(5) for a mechanism for overriding
   the general settings for individual packages.

ref: https://www.quora.com/What-does-command-sudo-apt-get-dist-upgrade

ref: https://askubuntu.com/questions/81585/what-is-dist-upgrade-and-why-does-it-upgrade-more-than-upgrade

时间: 2024-08-01 00:19:27

ubuntu sudo apt-get upgrade 和 sudo apt-get dist-upgrade区别的相关文章

Ubuntu和centos离线安装软件包(apt和yum)

linux安装软件包要解决包依赖问题,不能简单安装包本身. 离线安装基本思想都是先在一台设备上安装下载所有依赖包,然后拷贝所有依赖包到新设备上安装. Ubuntu下apt离线安装包 执行apt update后包依赖关系保存在/var/lib/apt/lists目录下,下载的包保存在/var/cache/apt/archives目录下. 分别拷贝两个目录下所有文件到新设备上,执行apt-get install即可安装相应包. 注意:测试中发现,有些依赖包没有下载到/var/cache/apt/ar

转:ubuntu添加用户adduser,并给予sudo权限

ubuntu添加用户adduser,并给予sudo权限 如何创建ubuntu新用户? 首先打开终端,输入:sudo adduser username正在添加用户"username"... 正在添加新组"username"(1001)... 正在添加新用户"username"(1001)到组"username"... 创建主目录"/home/username"... 正在从"/etc.skel&qu

ubuntu关于pam_tally2计数器在每次sudo时都增加的bug

使用pam_tally2模块来实现用户多次输入密码错误后锁住账号的需求,在/etc/pam.d/common-auth中增加pam_tally2的rule auth        required      pam_tally2.so deny=5 配置完成后先用login或者ssh的方式验证一下,当用户错误输入密码5次后,账户都会被锁住10秒钟:账户解锁后输入正确的密码,pam_tally2的计数器清零.查看计数器的命令如下: pam_tally2 -u admin 显示结果如下:  pam_

Ubuntu 下 docker 命令免输 sudo

当在Ubuntu系统中装好了Docker 后,发现输入 docker ps 命令时候,会提示 permission denied.如下图 需要执行 sudo docker ps 命令并键入密码才能够正确运行,有时候密码比较复杂不容易记住.有没有简单方法可以免输 sudo 跟密码呢?肯定是可以的. 我们只需要在组里面添加 docker, 然后把当前用户追加到 docker 这组当中就OK了.执行下面的命令. sudo groupadd docker sudo usermod -aG docker

Ubuntu改坏sudoers后无法使用sudo的解决办法

练习安装odoo的时候,创建了一个odoo用户,想把它赋予sudo权限,然而,编辑的时候不留意,改坏了,导致sudo无法使用,无法编辑sudoers文件修改回来. 总提示如下信息: >>> /etc/sudoers: syntax error near line 22 <<< sudo: parse error in /etc/sudoers near line 22 sudo: no valid sudoers sources found, quitting sudo

ubuntu如何修改IP地址、和apt源

新安装的ubuntu没有vim,使用vi修改自己的IP地址 [email protected]:~# cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback auto ens3 iface ens3 inet static address 192.168.200.7 netmask 255.255.255.0 gateway 192.

ubuntu 12.04 给用户添加 sudo 权限

创建用户的时候, 将用户组指定为 root , 用户其实是没有 sudo 权限的. 可以手动修改文件 /etc/sudoers ,在其中添加 user ALL=(ALL)ALL 但这样修改风险比较大, 文件如果改坏, 导致所有用户的 sudo 权限都没了. 比较好的方法是通过命令: sudo visudo 在命令模式下添加行: user ALL=(ALL)ALL 然后保存并退出即可.

Ubuntu 下误修改用户组导致sudo命令无效

1.手贱地修改了当前用户的权限组,导致sudo命令无法使用,且root用户的密码尚未修改,登陆不了root用户. 2.切换到recoverymode ,使用root用户登陆 3.执行mount -o rw,remount /命令可以修改文件系统为读写 4.然后使用passwd 命令修改root用户密码,重启 5.su - 命令切换到root 用户 6.修改/etc/sudoers文件把当前用户添加到root (ALL:ALL)=ALL行下 kevin (ALL:ALL)=ALL

修复ubuntu 安装mysql后必须使用sudo问题

修改root用户 查看用户的权限,是否是mysql_native_password,如果不是,则将auth_sock改为mysql_native_password. update user set plugin = 'mysql_native_password' where user = 'root'; 或者执行下面语句,这样就不需要执行Step2的内容啦! ?ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password