加入收藏 | 设为首页 | 会员中心 | 我要投稿 源码网 (https://www.900php.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Windows > 正文

如何在Debian/Ubuntu上手动安装安全更新?

发布时间:2019-07-22 14:26:23 所属栏目:Windows 来源:Magesh Maruthamuthu
导读:副标题#e# 在 Linux 上通过命令行安装一个包程序是一件简单的事。在一行命令中组合使用多个命令能让你更加简单地完成任务。 安全更新也同样如此。 在这个教程里面,我们会向你展示如何查看可用的安全更新,以及如何在 Ubuntu、LinuxMint 等等这些基于 Debia
副标题[/!--empirenews.page--]

/uploads/allimg/c190722/1563LT6463Y0-13A3.jpg

在 Linux 上通过命令行安装一个包程序是一件简单的事。在一行命令中组合使用多个命令能让你更加简单地完成任务。

安全更新也同样如此。

在这个教程里面,我们会向你展示如何查看可用的安全更新,以及如何在 Ubuntu、LinuxMint 等等这些基于 Debian 的系统中安装它们。

有三种方法可以完成这件事,下面会详细地描述这三种方法。

作为一个 Linux 管理员,你应该让你的系统保持为最新,这会让你的系统更安全,保护你的系统抵抗意想不到的攻击。

如果你因为一些应用的依赖问题不能解决,导致不能给所有的系统进行全部更新。那至少,你应该打上安全补丁来让你的系统 100% 符合要求。

方法一:如何检查 Debian/Ubuntu 中是否有任何可用的安全更新?

在进行补丁安装之前,检查可用安全更新列表始终是一个好习惯。它会为你提供将在你的系统中进行更新的软件包的列表。

默认情况下,你的系统上应该是已经安装了 unattended-upgrades 包的。但是如果你的系统没有装这个包,那么请使用下面的命令来安装它。

使用 APT-GET 命令 或者 APT 命令 来安装 unattended-upgrades 包。

  1. $ sudo apt-get install unattended-upgrades
  2. $ sudo apt install unattended-upgrades

什么是试运行? 大多数的 Linux 命令都有一个试运行选项,它会给出实际的输出但不会下载或安装任何东西。

为此,你需要在 unattended-upgrades 命令中添加 --dry-run 选项。

  1. $ sudo unattended-upgrade --dry-run -d
  2.  
  3. Initial blacklisted packages:
  4. Initial whitelisted packages:
  5. Starting unattended upgrades script
  6. Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic
  7. Using (^linux-image-[0-9]+.[0-9.]+-.*|^linux-headers-[0-9]+.[0-9.]+-.*|^linux-image-extra-[0-9]+.[0-9.]+-.*|^linux-modules-[0-9]+.[0-9.]+-.*|^linux-modules-extra-[0-9]+.[0-9.]+-.*|^linux-signed-image-[0-9]+.[0-9.]+-.*|^kfreebsd-image-[0-9]+.[0-9.]+-.*|^kfreebsd-headers-[0-9]+.[0-9.]+-.*|^gnumach-image-[0-9]+.[0-9.]+-.*|^.*-modules-[0-9]+.[0-9.]+-.*|^.*-kernel-[0-9]+.[0-9.]+-.*|^linux-backports-modules-.*-[0-9]+.[0-9.]+-.*|^linux-modules-.*-[0-9]+.[0-9.]+-.*|^linux-tools-[0-9]+.[0-9.]+-.*|^linux-cloud-tools-[0-9]+.[0-9.]+-.*) regexp to find kernel packages
  8. Using (^linux-image-4.15.0-51-generic$|^linux-headers-4.15.0-51-generic$|^linux-image-extra-4.15.0-51-generic$|^linux-modules-4.15.0-51-generic$|^linux-modules-extra-4.15.0-51-generic$|^linux-signed-image-4.15.0-51-generic$|^kfreebsd-image-4.15.0-51-generic$|^kfreebsd-headers-4.15.0-51-generic$|^gnumach-image-4.15.0-51-generic$|^.*-modules-4.15.0-51-generic$|^.*-kernel-4.15.0-51-generic$|^linux-backports-modules-.*-4.15.0-51-generic$|^linux-modules-.*-4.15.0-51-generic$|^linux-tools-4.15.0-51-generic$|^linux-cloud-tools-4.15.0-51-generic$) regexp to find running kernel packages
  9. Checking: apt ([])
  10. adjusting candidate version: apt=1.6.6ubuntu0.1
  11. Checking: apt-utils ([])
  12. adjusting candidate version: apt-utils=1.6.6ubuntu0.1
  13. Checking: bash ([])
  14. .
  15. .
  16. Checking: xxd ([, ])
  17. pkgs that look like they should be upgraded: binutils
  18. binutils-common
  19. binutils-x86-64-linux-gnu
  20. cpp
  21. cpp-7
  22. dbus
  23. dbus-user-session
  24. dbus-x11
  25. firefox
  26. firefox-locale-en
  27. g++
  28. g++-7
  29. gcc
  30. gcc-7
  31. gcc-7-base
  32. gcc-8-base
  33. libasan4
  34. libatomic1
  35. libbinutils
  36. libcc1-0
  37. libcilkrts5
  38. libdbus-1-3
  39. libdbus-1-dev
  40. libgcc-7-dev
  41. libgcc1
  42. libgfortran4
  43. libgomp1
  44. libitm1
  45. liblsan0
  46. libmpx2
  47. libquadmath0
  48. libstdc++-7-dev
  49. libstdc++6
  50. libtsan0
  51. libubsan0
  52. vim-common
  53. vim-tiny
  54. xxd

(编辑:源码网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读